Skip to content

Latest commit

 

History

History
53 lines (36 loc) · 2.11 KB

README.md

File metadata and controls

53 lines (36 loc) · 2.11 KB

alskdjlkasdf

2021/05/26 Git Collaboration

  • git clone <URL>: downloads the repo to current directory

Branches

  • git branch <NAME>: create branch
  • git branch -a: list all branches
  • git branch -d <NAME>: delete
    • git branch -D <NAME>: force delete
  • git switch <NAME>: switch to
    • git checkout <NAME>: "older" way to switch branches
  • git switch -c <NAME>: create and switch to branch 1 command
    • git checkout -b <NAME> same using checkout

Pull Requests

  • Also see branch delete above
  • git log --oneline --graph --all: show you git history
  • git fetch --prune: clean up your git history

Conflicts

You won't know it's going to happen until it does.

  • git rebase <BRANCH>: e.g., will update current branch

Some additional notes and links