Differences

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

Link to this comparison view

Next revision
Previous revision
docs:git:gitr [2010/09/24 13:32] – created billhdocs:git:gitr [2010/10/18 15:22] (current) billh
Line 1: Line 1:
 ====== gitr ====== ====== gitr ======
 +
 +===== purpose =====
 gitr is a script I've developed for my project needs.  It runs git commands recursively with special consideration for what I want to see or how my projects are typically structured. gitr is a script I've developed for my project needs.  It runs git commands recursively with special consideration for what I want to see or how my projects are typically structured.
 +  * it helps me identify projects where I have commits that haven't been pushed to remotes
 +  * it helps me update all my repos at once, either by fetching to review or by pulling to merge
  
 +===== making it available as shell command =====
 You can have this as a command available wherever you are by placing it in /usr/bin/gitr (without the .sh), and making it executable. You can have this as a command available wherever you are by placing it in /usr/bin/gitr (without the .sh), and making it executable.
  
 +===== script =====
 **gitr.sh** **gitr.sh**
 <code> <code>
Line 15: Line 21:
 elif [ "$1" = "pull" ]; then elif [ "$1" = "pull" ]; then
  gitrmode="pull"  gitrmode="pull"
 +elif [ "$1" = "showconfig" ]; then
 + gitrmode="showconfig"
 fi fi
  
 if [ "$gitrmode" = "" ]; then if [ "$gitrmode" = "" ]; then
- echo -e "Usage: `basename $0` <fetch|status|pull>\n"+ echo -e "Usage: `basename $0` <fetch|status|pull|showconfig>\n"
  exit  exit
 fi fi
Line 47: Line 55:
  echo -e "\n";  echo -e "\n";
  
 + elif [ "$gitrmode" = "showconfig" ]; then
 + echo "showing .git/config for ${item}..."
 + cat .git/config
 + echo -e "\n";
  fi  fi
  
  • docs/git/gitr.1285356731.txt.gz
  • Last modified: 2010/09/24 13:32
  • by billh