Skip to content

Instantly share code, notes, and snippets.

@dineshvg
Created December 26, 2016 17:32
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dineshvg/51cb12c2f551b04de923486989a2a980 to your computer and use it in GitHub Desktop.
Save dineshvg/51cb12c2f551b04de923486989a2a980 to your computer and use it in GitHub Desktop.
Git commands that can come in handy during developement
Get all remote branches
git fetch --all
git checkout -b <ur_new_local_branch_name> remotes/origin/<Remote_Branch_Name>
Check which local branch of yours track which remote branch in Git
git branch -vv
Obtain code from Git
Gets the master branch code.
git clone https://dineshvg@bitbucket.org/dineshvg/shiftbuddy.git
Git code commit cycle
First pull changes from other people onto your local
git pull
After making the code changes check what are the changes that you are committing
git status
To commit all changes
git add .
git commit -m "#SB-<Issue number> message added for the commit"
git push
( OR )
git remote -v
git fetch origin
git branch -avv
git branch branch_name origin/branch_name
git checkout branch_name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment