A sandbox repo for practicing the basic git workflow: clone, change, commit, push.
- Clone the repo (once):
git clone git@github.com:GreshamLab/git-practice.git cd git-practice - Set your identity (once per machine, if you haven't already):
git config --global user.name "Your Name" git config --global user.email "you@nyu.edu"
- Make a change: create a file named after yourself in
people/:cp people/TEMPLATE.md people/yourname.md # edit people/yourname.md with any editor - Commit it:
git add people/yourname.md git commit -m "Add yourname" - Push it:
git pull --rebase # pick up everyone else's changes first git push
If git push is rejected with "fetch first" or "non-fast-forward", someone pushed
before you. Run git pull --rebase and then git push again.
Once everyone has pushed, add one line to the bottom of guestbook.md, then commit and push.
Since everyone is editing the same spot, most people will get a conflict. To fix one:
open the file, keep everyone's lines, delete the <<<<<<<, =======, >>>>>>> markers, then:
git add guestbook.md
git rebase --continue
git push