Skip to main content

22.02.01 - Git

When using git pull sees if there is a difference between the server and local copy Have an official source on server and a working copy

  • Keep a history of everything
  • Designed to stop multiple people overwriting changes by mistake
  • Lets you work on copies (branches)

git add - move file to the main code folder git commit - commit into the main code folder git log - See history of code, can see it at any time, step backwards to a previous commit.

- Can roll back an entire git folder
- Can extract a single file out of an old commit

git tag - Gives friendly name to a commit. Can be a working version that is ready for release

Multiple people have their own copy, git push updates to server.

- Git will handle anything thats easy, easy when someone else has edited a different bit of the same file
- When it cant - itll ask you to do it 'intelligently'

git pull - brings down the latest version. Should do it before coding, andbefore pushing to see if there is any changes git diff - show you the difference between the two files git stash - stores everything in process, can then pop it out later. Keeps it secure .gitignore - ignore files to push

Top Tips

  • Use good commit messages
  • Get on top of markdown, to make things nice
  • Configure your git