Site Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
blog:2023:10:12:git-alias [2023-10-13] dcaiblog:2023:10:12:git-alias [2024-12-16] (current) dcai
Line 1: Line 1:
-====== Some handy git aliases I use all the time  ======+====== git aliases I use all the time  ======
  
  
 ==== 1. choose branch to check out from fzf ==== ==== 1. choose branch to check out from fzf ====
  
-'''fzf''' is such a great tool, it changes the way how I operate in vim and shell, git checkout autocomplate with branch is great, but it's better to list branches in a menu then choose it, therefore I add below to git config file:+''fzf'' is such a great tool, it changes the way how I operate in vim and shell, git checkout autocomplate with branch is great, but it's better to list branches in a menu then choose it, therefore I add below to git config file:
  
 <code> <code>
Line 13: Line 13:
  
  
-Sometimes, I want to checkout remote branch, I use alias below, '''refname:lstrip=3''' strips the remote name from branch name ref, so git checkout could figure out and create a local branch to match it.+Sometimes, I want to checkout remote branch, I use alias below, ''refname:lstrip=3'' strips the remote name from branch name ref, so git checkout could figure out and create a local branch to match it.
  
 <code> <code>
Line 25: Line 25:
 </code> </code>
  
-The idea is list all local branches, but remove current branch (it's marked with *), pipe to fzf so user could select them by pressing '''tab''', finally pipe to git to delete.+The idea is list all local branches, but remove current branch (it's marked with *), pipe to fzf so user could select them by pressing ''tab'', finally pipe to git to delete.
  
  
Line 53: Line 53:
  
 </code> </code>
- 
blog/2023/10/12/git-alias.1697162430.txt.gz · Last modified: by dcai