# ~/.netrc
machine host.com.br
login user_login
password user_passwords
gedit ~/.bashrc
export PATH=$PATH:/home/umstudio/dev
chmod +x /home/umstudio/dev/gitu.sh
Command |
Description |
git status |
List the files you've changed and those you still need to add or commit |
git add * |
Add all pending files to staging |
git reset HEAD <file> |
Unstage file |
git commit -m "comentários" |
Commit files |
git push origin master |
Push commited files |
Command |
Description |
git branch |
List local branchs |
git branch -r |
List remote branchs |
git branch -a |
List local and remote branchs |
git diff --name-only provisorio..master | zip upload.zip -@ |
Create Zip |
git branch |
merged master lists branches merged into master |
git branch --merged |
lists branches merged into HEAD (i.e. tip of current branch) |
git branch --no-merged |
lists branches that have not been merged |
git log --all --full-history -- **/thefile.* |
list file inside history |
Command |
Description |
git config --global advice.statusHints false |
Remove Hints |
Command |
Description |
git reset --soft HEAD~1 |
Undo the last commit - keep changes |
git reset --hard HEAD~1 |
Undo the last commit - remove changes |
1 - git remote add local-alias-name [email protected]:local-alias-name-empresa/nome-do-git.git
2 - git fetch local-alias-name master
3 - git push local-alias-name HEAD:master
- How to fix GitKraken Inotify Limit Error - upgrading Ubuntu/Linux inotify limits
echo 99999 > /proc/sys/fs/inotify/max_user_watches
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote