Git; Get All Branches Last Commit Date and Time

for k in `git branch | perl -pe s/^..//`; do echo -e `git show –pretty=format:”%Cgreen%ci %Cblue%cr%Creset” $k — | head -n 1`\\t$k; done | sort -r The set of piped commands above produces easy-to-read output of all your repo’s branch names and their last commit dates. Below is an explanation of the commands: for k… Continue reading Git; Get All Branches Last Commit Date and Time

GIT Using SSH to Push Remote to Server

On the server terminal, type: git remote add origin ssh://user@domain.com:22/home/user/remote.git The name of your remote repo will be ‘origin’. ‘user’ is your user name, ‘domian.com’ is your domain or IP address. ‘:22’ is the port number used to connect to your ssh server. ‘/home/user/remote.git’ is the location of your remote git repo. Before you push… Continue reading GIT Using SSH to Push Remote to Server