A Clojure application designed to aid the user in using Git.
- Clone Git-guru to ~/bin/ (git clone https://github.com/tonyblatt/git-guru.git)
- Add ~/bin/git-guru/scripts to your path
- install wget, git and git-gui on your cygwin 3.1 from the windows command pompt, execute: \path\to\cygwin\installer -q -P wget,git,git-gui
- Install whatever git mergetool you would like to use
- Edit ~/bin/git-guru/store/settings.txt merge-tool to be your preferred merge tool (meld is the default)
- execute install-git-guru in git-guru/scripts
- add git-guru/scripts to your system path
Commits your code to the current branch
commit
- Checks to make sure you are not currently on develop/master
- Brings up git gui for you
Move from one branch to another.
branch BRANCH_NAME
- Commits your code (see the commit script for how this works)
- Prevents you from switching branches if you have code to commit and are not on develop/master
- Switches you to develop/master
- Executes a git pull
- If BRANCH_NAME is develop/master, exits
- If BRANCH_NAME exists, switches to and rebases (this is the git rebase not the script rebase) that branch, otherwise (BRANCH_NAME does not exist), creates BRANCH_NAME and switches to it
Rebases the current branch to the most current code from the server. This is the same as executing 'branch CURRENT_BRANCH'.
rebase
- Commits your code (see the commit script for how this works)
- Prevents you from switching branches if you have code to commit and are not on develop/master
- Stores the CURRENT_BRANCH as BRANCH_NAME
- Switches you to develop/master
- Executes a git pull
- Switches to BRANCH_NAME
- Rebases BRANCH_NAME
Not yet implemented.
- commit (necessary)
- rebase (necessary)
- rebase --all -> scripts not ready for yet
- branch BRANCH_NAME (necessary) -> top level
- branch BRANCH_NAME --rebase
- branch BRANCH_NAME --no-pull
- push (necessary) -> to level
- push --update
- Commit
Commits changes to the local repository. Checks performed:
-
that we are not on develop
-
that there are changes to be committed
-
check for previous commits to branch
-
Rebase
Branch to the current branch
- Branch
Checks performed:
- switching to develop
- switch to branch already exists
- should rebase
- check if changes exist
- should pull
Future:
-
similar branch name exists
-
Push
Checks performed:
- check if branch is up to date
- check if branch has ship it
- check if there are any local changes to commit
- check if there is already a review board post from this branch
- check if there are changes to the local branch
- check if rebase had any impact
Actions performed:
- push (push) (description: sends to review board, updates review board, applies patch)
- update specific review (push --update)
Pseudo-code:
if commit == success if there are still changes to the branch print “cannot push with uncommitted changes” else rebase if rebase had an impact print “update from server made changes. please retest before pushing.” else if branch has already been pushed from if the user requested an update or review board does not have a shippit update review on review board print “need to publish changes to have code review done” else download diff and push diff to server -- apply patch finish the branch end if else post changes to review board print out review number print “need to publish changes to have code review done” end if end if end if else print “cannot push from this branch” end if
Copyright © 2014 FIXME
Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.