![]() ![]() And sometimes you just need to try something fast and close it. Sometimes even if I'm not using something at the moment (or in the last few days / weeks) the terminal windows are left as is (often to avoid going to the needed directory). It's rare occasion having only one terminal open as often I'm working with multiple projects / tools at the same time. ![]() Once you learn a few shortcut keys and develop your personal work flow you would hardly want to leave that black (differs) window.īelow is some of the shortcut keys I use. It's a great terminal application and it would be hard to imagine my days without it. More about me.If you use Mac OSX and do a lot of work in terminal the iTerm application will become your friend fast. I’m currently with the folks at Planning Center, and I’ve worked with well-known brands and agencies, which include Allstate, Brian Hoff Design, Leo Burnett, and OLSON. I’m a multidisciplinary developer & designer. JavaScript Templating Without a Library.Terminal/Bash Command-Line Shortcuts with Aliases. ![]() ← Previous Post Next Post → Related posts If you have any alias or functions that are particularly useful, I’d love for you to share it with me. May these aliases and functions spare you thousands of keystrokes and extend your life expectancy. I realize there are more possibilities for other Git commands, but for anything outside of these, I run them manually however, feel free to add your own or make modifications to your liking. Occasionally I want to search for a commit by the commit message. While glg is a detailed, decorative graph view of git log:īy default gm, the alias for git merge, defaults to -no-ff (no fast-forward)-many times I have more than 1 feature branch in development, each of those branches has more than 1 commit, and I feel that the history of the merges are important.Īliases are great but are limited in scope, which is why I had to use a function for glf, my Git log find function. Fix http to https.Ħa42288 Uglify critical in production task. Change up priority.į72ccc1 Social share post include Reddit. Most of the aliases are pretty straight forward-for example, instead of git add assets/css/screen.css, you can run:ģ7372ec Remove third-party Twitter widget.js completely and replace with intent link.ħd1a5d2 Uglify critical in production task.ĩ3df2b1 Exclude topic and archives from sitemap. You can quickly see how these aliases can save you keystrokes. ' alias gaaa = 'git add -all' alias gau = 'git add -update' alias gb = 'git branch' alias gbd = 'git branch -delete ' alias gc = 'git commit' alias gcm = 'git commit -message' alias gcf = 'git commit -fixup' alias gco = 'git checkout' alias gcob = 'git checkout -b' alias gcom = 'git checkout master' alias gcos = 'git checkout staging' alias gcod = 'git checkout develop' alias gd = 'git diff' alias gda = 'git diff HEAD' alias gi = 'git init' alias glg = 'git log -graph -oneline -decorate -all' alias gld = 'git log -pretty=format:"%h %ad %s" -date=short -all' alias gm = 'git merge -no-ff' alias gma = 'git merge -abort' alias gmc = 'git merge -continue' alias gp = 'git pull' alias gpr = 'git pull -rebase' alias gr = 'git rebase' alias gs = 'git status' alias gss = 'git status -short' alias gst = 'git stash' alias gsta = 'git stash apply' alias gstd = 'git stash drop' alias gstl = 'git stash list' alias gstp = 'git stash pop' alias gsts = 'git stash save' # - # Git Functions # - # Git log find by commit message function glf () # - # Git Aliases # - alias ga = 'git add' alias gaa = 'git add. Don’t forget to reload your file ( source ~/.bash_profile) or restart Terminal after making changes. for aliases, there must be no spaces before and after the equal signs, and for functions, there must be a space after the opening curly bracket of the declaration and a semicolon after the command. When copy & pasting, it’s important to keep the spacing. Notes: If you’ve never set an alias before, don’t know where to put them, or have no clue what I’m talking about, read my post on Terminal/Bash Command-Line Shortcuts with Aliases before continuing. To use them as your own, just add them to the file you store your aliases/functions. Here’s my list of Git Bash aliases and functions. Since Bash is Terminal’s default command-line interpreter, you can also set Bash aliases to reduce your keystrokes even further. instead of git checkout you can type git co, but you still have to type git). Git allows you to set aliases but they’re limited and only save you a few keystrokes (i.e. I created a set of keyboard shortcuts with Bash aliases and functions to speed up my workflow and save me hundreds of keystrokes every day. A lot of my time is spent in Terminal and a majority of it is spent typing Git commands.
0 Comments
Leave a Reply. |