Friday 9 May 2014

git common commands

git init  --- initialise git repository on the local machine
git status --- view the current files changes (add,remove or untracked...)
git add   --- add untrack files to repository (wildcast supported)
git add   --- remove files to repository and disk as wll (wildcast supported)
git commit --- commit the change to the repository
git log -- show git commit history
git remote add origin [github or git server URL]  --- link the local repository to the
git push origin master    --- push the local commits to remote repository
git pull origin master  --- pull down the remote repository
git reset --- reset the stage
git branch [branchname] --- create a new branch
git checkout [branchname] --- switch to another branch
git merge [branchname] --- merge the branch with the current branch
git branch -d [branchname] --- delete the branch

No comments:

Post a Comment