Git lazy with more aliases

Amending ~/.gitconfig file. [alias] # one-line log 1 mylog = log --pretty=format:'%C(yellow)%h %Cblue%>(12)%ad %Cgreen%<(7)%$ # one-line log 2 l = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ $ g = git a = add ap = add -p c = commit --verbose ca = commit…

Optimising Git work flow with functions & aliases

For this example I'm automating elements of work flow in publishing Ghost post updates to github pages. I'm utilising Buster to generate a static version of a ghost blog before pushing to github pages. Located in user home directory, the .bash_profile can have functions added to it to optimise…

Pretty one line Git commits

Editing the .gitconfig file for a more readable git log by adding the following settings. [log] date = relative [format] pretty = format:%C(yellow)%h %Cblue%>(12)%ad %Cgreen%<(7)%aN%Cred%d %Creset%s These settings ensure for ease of reading log lines that they are colour coded…

Improving the command line experience

Adjusting OSX Terminal with bash, rearranging and enabling colours to allow for easier scanning and readability. Located in user home directory, .bash_profile can be edited with nano .bash_profile or preferred editor. The following can be added to the file: export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\…

Pushing all Git branches

To push all your branches, use either (replace REMOTE with the name of the remote, for example "origin"): git push REMOTE '*:*' Or git push REMOTE --all However --all only works with branches checked out so will require preceeding with: for remote in `git branch -r | grep -v master…