The more you work with Git the more familiar you become with the commands used in your every day workflow for your projects or your team’s projects. Commands like naming and creating feature branches making pull requests or pushing your changes if you have the requisite permissions. So still used by me on a daily basis, and everyone else that uses git [I presume] is the command, then and or git add . git commit -m "my awesome feature" git push git push origin <branch> In my short time using Git I have always just typed out the full commands [usually with close to hand] and thought nothing more of it, that is how you use the tool, right? my cheatsheet Well that was what I foolishly presumed until I learned about dotfiles, I learned about files from listening to the podcast with and a great channel for learning about tooling 👍 the podcast was about give it a listen it’s a great show. . toolsday.io Chris Una Git Tools This was a pretty cool learning experience for me and I now have a pretty efficient git workflow 🚀 Let’s go over , do you remember having to enter your email address and name when first setting up Git on your computer? That information is stored in your file, your file will be located in your user folder on Windows or on Linux/Mac .gitconfig .gitconfig C:\Users\yourusername\.gitconfig ~/.gitconfig If you navigate to the file in the text editor of your choice and pop it open you’ll see your details under the `[user]` flag, here’s mine: [user]name = spences10email = spences10apps@gmail.com I’m not sure what other configuration options you may have in yours so we’re just going to concentrate on the aliases, aliases can be used so that you can shorten the commands [or make them longer if you like] but I’m all for reducing key strokes, even if it is one or two less. So lets review the common commands I mentioned at the start: git add .git commit -m ‘my awesome feature’git push So with aliases we can shorten these down a bit: In your file if there’s not already one there add in the section, I have mine above my user details, then add in some aliases: .gitconfig [aliases] [alias]a = add .c = commit -amp = push [user]name = spences10email = spences10apps@gmail.com So now we can shorten down our workflow for adding a change to one of our repos: git add .git commit -m ‘my awesome feature’git push Will become: git agit c ‘my awesome feature’git p It’s not a massive reduction in what you’re typing but you’ll be amazed at how quickly you become accustomed to it and start adding more an more. Here they are in action 👍 Here’s my current list of aliases: [alias]a = add .b = branchc = commit -amcl = cloneco = checkoutd = difff = fetchi = inito = open # see: https://github.com/paulirish/git-open ♥p = pushpt = push --tagss = statust = tag A new one I have found out whilst making this post is which clones only the HEAD of the repository instead of the whole repository, so say if you were cloning react you’d just get the master version rather than the other 38 branches included in the repository. Pretty neat so that could be aliased into something a lot shorter clone --depth 1 git cl1d? You’ll no doubt notice the link I have in there for that little gem belongs to it’s an npm package that will pop open a browser tab to the current repository you are in, pretty neat right? o = open Paul Irish I’m sure there are many, many more ways to configure Git if you take a look at for his you’ll see there is a lot of ways to configure Git, I’m still learning and finding new ways to do things. Paul Irish’s dotfiles repo [.gitconfig](https://github.com/paulirish/dotfiles/blob/master/.gitconfig) If there is anything I have missed, or if you have a better way to do something then please let me know. Get me on or on GitHub. Twitter Ask Me Anything If you like this post or if it has helped you in any way then please give it a like and don’t forget to share it on social media.