Saturday 6 February 2016

Useful & Basic GIT Commands

Download Gitbash and install
1)  Right click on the folder where you would like to checkout the branch and choose  gitbash , command prompt will appear.
2) Use the following command to setup the repository  path in your local
     git clone  <branch repo path.git>
3)  Use the following command to  checkout the branch to the local directory.
     git checkout < branch-name>
4) Use the following command to know the status like the branch name and the files that are to be added or modified in your local
git status
5) Use the following command to pull the latest contents from the remote repo
git pull
6) Use the following command to clean/reset all the files from the local repo
git reset --hard
7) To know the remote repository path
git remote -v

No comments:

Post a Comment