GIT cheat sheet =============== Authors: - Andras Botond Csepreghy (mainly) - Troels Petersen (secondly) Last update: 23rd of November 2019 ------------------------------------------------------ # See the list of files you have changed: git status # See the exact changes in all the files you have changed: git diff git diff __init__.py # See all the changes you have made locally to specific file: # Ensure your local version is up to date (i.e. have all the changes from others - always pull before pushing): git pull # NOTE: If you have a conflict, and simply want to get the latest (original) version, # then you might simply rename or delete the file you have locally, and run "git pull" again. # adds __init__.py to staging. You can now commit from staging: git add __init__.py git add . # Adds all changes to staging. # Commits all the changes you added to staging. You can make multiple commits before pushing them: git commit -m "my commit message that describes accurately what I changed in the code" # See all commits you have locally. It only shows commit message, id and author: git log git log -p # See changes from all commits you have locally (like doing git diff) # And finally... if you have a bad merge conflict, cry quietly. We all know how you feel. :")