Skip to content

Latest commit

 

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

git-practice

A sandbox repo for practicing the basic git workflow: clone, change, commit, push.

Your task

  1. Clone the repo (once):
    git clone git@github.com:GreshamLab/git-practice.git
    cd git-practice
  2. 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"
  3. 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
  4. Commit it:
    git add people/yourname.md
    git commit -m "Add yourname"
  5. 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.

Bonus: a merge conflict

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

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors