Find the executable at https://git-scm.com/download/win
Just press 'Next' until Choosing the default editor useby by Git.
Find DMG installable at https://git-scm.com/download/mac
Starting a new git project:
mkdir my_folder
cd my_folder
git init
Pulling existing git project from the web:
git clone https://github.com/robinchew/workshop_notes.git
-
git log (You can use gitk alternatively)
-
git log (gitk and stuff)
-
git status
-
git diff
-
git add file.py
-
git commit -m "First Commit"
-
git commit -a -m "Add and commit"
Git reset 2 commits back without losing data:
git reset HEAD^^
Git reset 5 commits back without losing data:
git reset HEAD~5
git pull (but only works if you have run git clone
or used git remote add
)
- Signup an account at github.com
- Create a new repository in github.com
- Remember to NOT initialise the new repository with a README file