git add .
git commit
git pull origin master
git pull --rebase origin master
git push origin master
git push --force origin master
Restore repository to a clean state, deleting even the files ignored (at the end you'll have a repository just like a fresh git clone
)
git clean -fdx
git stash
git stash apply
git checkout -b branch_name
git checkout master
git reset --hard origin/master
git branch --delete branch_name
git tag v0.0.1
git tag --delete v0.0.1
git push origin branch_or_tag_name
git push origin :branch_or_tag_name
git cherry-pick change_id
git rm -r --cached .
git add .
git commit -m ".gitignore fix"