git

Undo almost anything in Git

A great blog post on how to undo almost anything in Git:

 

https://github.com/blog/2019-how-to-undo-almost-anything-with-git

By |June 8th, 2015|Coding|0 Comments

Creating aliases in git

If you are like me and use git bash, powershell cmd or some other command line utility for git you quickly learn there is a lot of keystrokes to do repetitive tasks. Creating aliases in git is a convenient way to minimize the amount of keystrokes you will have to make. Here are some alias I have setup that I use on a daily basis:

Alias Name Configuration Setup Example Usage Description
git b git config –global alias.b branch git b master Allows you to easily switch branches
git co git config –global alias.co checkout git co new_feature Checkout a new branch
git undo git config –global alias.undo “reset HEAD~1 –mixed” git undo Undo the last commit.

Each time you create an alias you are adding it to one of 3 config files: local, system and global. In the examples above I add it to the global config file. To learn more about these config files take a look here: git-config

By |August 6th, 2014|Coding|0 Comments

Reference for learning GIT commands

Reference for learning GIT commands

By |October 16th, 2012|Coding|0 Comments