MikeDre
2/28/2019 - 10:26 AM

Git Commands

To delete a local branch
git branch -d the_local_branch

To remove a remote branch
git push origin :the_remote_branch

or simply use the new syntax
git push origin --delete the_remote_branch

Fix last commit message
git commit --amend

Change branch name
git branch -m relaese release
git push origin --delete relaese
git push origin release

Added a wrong file in the repo

If you haven't commited it yet then you only have to reset the file.
git reset /assets/img/unknown.jpg

If you have gone committing that change, no need to worry. You just need to run an extra step before:

git reset --soft HEAD~1
git reset /assets/img/unknown.jpg
rm /assets/img/unknown.jpg
git commit