Git: Difference between revisions

2 bytes added ,  12 April 2014
m
→‎Introduction: s/see/show/
(start with a little Git introduction)
 
m (→‎Introduction: s/see/show/)
Line 15: Line 15:
git checkout -b cool_new_feature # create a branch for what you are working on
git checkout -b cool_new_feature # create a branch for what you are working on
$EDITOR some/file.cpp            # serious hacking
$EDITOR some/file.cpp            # serious hacking
git status                      # see changed, new or deleted files
git status                      # show changed, new or deleted files
git add some/file.cpp            # mark changes to be committed (adds them to the "staging area")
git add some/file.cpp            # mark changes to be committed (adds them to the "staging area")
git status                      # see what is staged
git status                      # show what is staged
git commit                      # editor pops up, edit the commit message, save, close
git commit                      # editor pops up, edit the commit message, save, close
git push origin cool_new_feature # publish the branch at GitHub
git push origin cool_new_feature # publish the branch at GitHub
2,231

edits