Tuesday, 16 February 2016

Git: quick reminder

The post consists of sets of frequently used sets of commands.


How to pull the data?
git init
git remote add origin https://github.com/...
git pull origin master
view raw Git pull hosted with ❤ by GitHub
How to push the data?
git add .
git commit -m 'Message'
git push origin master
view raw gistfile1.txt hosted with ❤ by GitHub
To check what files are going to be updated: git status
How to make a tag?
git tag pub1
git push origin pub1
view raw gistfile1.txt hosted with ❤ by GitHub
How to remove a tag?
git tag -d pub1
How to undo git add:
git reset file.txt

No comments:

Post a Comment