Git Quickreference
Git Quickreference
1. Setup Git locally ( clone server copy to your machine from where you will
perform pull/push)
> git clone <<git-repo-url>>
2. If you already have git on your PC. Switch to master git branch to sync your
local copy with server copy
> git checkout master
If pull fails then run stash command to discard any changes you have done
before pull command
> git stash
5. Once you have create branch. Create new file in git folder location or modify
any existing file. After you are done making changes. Add those files to you branch
( this will not push your changes to git)
> git status ( this will list all the files which has been modified by you
under current selected branch)
6. Now commit you changes to you branch (still files will not be visible to anyone)
> git commit -m "your message against the commit"
7. Now push changes to git (this will save changes to git and will reflect to
anyone who pulls created branch)
> git push origin feature/<<branch name>>