git tag -d _tagName_ git push origin :refs/tags/_tagName_
Revert
“Revert” reverts any public commits done on the repository (current branch).
Revert Commit(s) from the history by generating another commit that reverses the impact of the commit that you are trying to revert.
1 2 3
git commit -m "changes that will be reverted" git revert HEAD # newset commit points to previous commit git revert HEAD~2 # newset commit points to the commit 2 commits ago
Revert all unstaged changes
1
git checkout -- . # . = all changed files
Reset
Reset CHANGES the history, whereas revert ADDS to the history. BEWARE! Is designed only for local changes
1 2 3 4 5 6 7 8 9 10 11 12 13 14
# Create a new file called `foo.java` and add some code to it
# Commit it to the project history git add foo.js git commit -m "Start developing a crazy feature"
# Edit `foo.js` again and change some other tracked files, too
# Commit another snapshot git commit -a -m "Continue my crazy feature"
# Decide to scrap the feature and remove the associated commits git reset --hard HEAD~2
Brett Uglow
I am a software engineer (with a focus on the front-end) with 15+ years in the IT industry, working with large telecommunications and financial companies. I’m passionate about creating great user experiences, writing code that is testable + maintainable + efficient, and seeing peoples’ lives changed-for-the-better.
I am the voice of one crying in the wilderness, “Make straight the way of the Lord!” John 1:23
I have been developing a website for a top-tier client in Melbourne. The site is built using AngularJS (v1.1.5 as of time of writing), SASS, Compass and GruntJs to pull it all together. The development team consisted of myself as lead dev, Mario Skouros, Peter Mescalchin and Steven Yip, with assistance from Michael Black and Vlado Grancaric. Well done guys!
On Monday 23rd June, I was privileged to attend the first AngularJS Melbourne Meetup as a guest speaker. Thanks to Alex for organising the event. It was a great night!