Skip to content

Instantly share code, notes, and snippets.

@hamaadshah
Last active March 3, 2018 13:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hamaadshah/9e097b27d9703cad5fa0eeaa4db7660c to your computer and use it in GitHub Desktop.
Save hamaadshah/9e097b27d9703cad5fa0eeaa4db7660c to your computer and use it in GitHub Desktop.
Some basic git commands.
git init
git add --all .
git commit -m "First commit."
git remote add origin https://github.com/user.name/project
git remote -v
git remote set-url origin https://github.com/user.name/project
touch .gitignore
echo "" >> .gitignore
echo ".*" >> .gitignore
echo "" >> .gitignore
echo "!/.gitignore" >> .gitignore
git rm -r --cached .ipynb_checkpoints
git config --global user.email "user.name"
git config --global user.name "user.email"
git pull -r origin master
git push -u origin master

git fetch origin master
git reset --hard origin/master
git show --oneline -s

git checkout master
git checkout transfer_learning .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment