User Tools

Site Tools


programing:git

This is an old revision of the document!


Git Cheat Sheet

NOTE: Even as a database guy, you still should check in your scripts, etc..

A Good reference: https://education.github.com/git-cheat-sheet-education.pdf

If doing work in the master branch

  • cd <directory>
  • git pull origin master
  • git add –all
  • git commit
  • git push origin master

Creating a branch and merging changes

           mike branch
     /---------------------->
    /                        \ 
---O--------------------------O------------>
   |                          |
 branch                     merge              
  • cd <directory>
  • git branch mike_branch
  • or
  • git checkout -b mike_branch
  • git status
  • git add .
  • git commit -m “some comments”
  • git push origin mike_branch

This pushes the changes from the mike branch to upstream on github

programing/git.1765503575.txt.gz · Last modified: by mlivolsi