Skip to content

Makes Git a little more user friendly and a little more user safe (idiot proof)

Notifications You must be signed in to change notification settings

j3g/GitScripts

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitScripts Read Me
==================

A series of shell scripts that simplify and streamline the use of Git.

source _gsinit.sh in your bash.rc

Basic Components
----------------

 - bash_profile_config --- This file holds all default aliases and bash customizations
 - bash_profile_config.overrides --- This is an ignored file you can create to hold your personal bash aliases and customizations
 - environment_config.default --- This file is basically a template for environment_config.overrides
 - environment_config.overrides ---- copy environment_config.default and rename it to environment_config.overrides. Uncomment everything and customize it in this file.

These four files are concatenated together to become your "bash_profile" file.


The rest of the files in this project are little programs that were written to make it easier to use git and to automate certain tasks.

A basic run-down of the most commonly used tasks is listed in aliases.txt



First Run
---------

The very first time you configure this project, you will need to:

	1. cp environment_config.default environment_config.overrides
	2a. Open the newly created environment_config.overrides
	2b. Uncomment all of the variables
	2c. Change all of the lines that need changes
	3. Run the following commands from inside gitscriptshome directory:

source environment_config.overrides
source refresh_bash_profile.sh


After that, you should periodically run the "pullscripts" command which will pull down changes to this project (so you don't have to download and install them yourself).



GitScripts helps make git more user friendly and more user safe. It is a set of bash scripts that will make your life much easier and streamline your use of Git.

The most basic example is as follows. To see which files have changes, you would normally type:

git status

With GitScripts you can just do:

status


Say you have changes to 5 tracked files that you want to commit. Normally you would have to do the following:

git commit -a -m "my comments on my changes"

With GitScripts you can just do:

commit "my comments on my changes" -a


I know, these doesn't seem much different. But it *did* save just a little bit of time. Two paper cuts (in a world of Windows, that's two paper cuts less in the death by a thousand paper cuts that you suffer every day).


Here's where the real magic happens though. Let's say you want to create a new branch. Normally you would have to do all of the following (if being safe):

git status
git stash (or) git add -A, git commit -m "your commit"
git push origin branch
git checkout master
git fetch --all --prune
git checkout -b newbranch


Whew! OK, with gitscripts, you just do:

new branch from branch


That's it. It jumps into an intelligent guided numeric menu driven process that does everything that you would normally have to do by hand with nominal intervention from you only when absolutely necessary with intelligent defaults so that 90% of the time you are just hitting "Enter".


Let's say you want to merge two branches. Normally you would have to do all of the following (if being safe):

git status
git stash (or) git add -A, git commit -m "your commit"
git push origin branch
git fetch --all --prune
git checkout branchtomergefrom
git pull origin branchtomergefrom
git checkout branchtomergeto
git pull origin branchtomergeto
git merge branchtomergefrom
git add .
git commit -m "merging branchtomergefrom"
git push origin branchtomergeto

Yikes! Again, GitScripts to the rescue! Here's what you would do in GitScripts:

merge branchtomergefrom into branchtomergeto


:D

GitScripts does not replace Git. It's kind of a wrapper for Git, or more, an extension to Git's built in shell scripts. If you install GitScripts, you can still access all of your git commands exactly the same way you used to. However, now you have an extra library of commands at your disposal.

About

Makes Git a little more user friendly and a little more user safe (idiot proof)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published