Pinned Loading
-
Personal .bashrc setup (Lots of stol...
Personal .bashrc setup (Lots of stolen stuff and useless why-not(s)) 1# ~/.bashrc: executed by bash(1) for non-login shells.
2# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
3# for examples
45# If not running interactively, don't do anything
-
Git Aliases.md
Git Aliases.md 1**Pretty print git logs in one line**
2*Optionally, add `-<number>` to increase the log reach*
34```
5$ git config --global alias.lg 'log --format="%C(auto)%h %Cgreen%s %Creset(%cN, %cr) %C(auto)%d" -10'
-
Remove all unwanted git branches
Remove all unwanted git branches 1#!/bin/bash
2# Installation:
3# Linux:
4# > Save it in a PATH folder
5# > Give execution permission to this file
-
Tired of typing git push origin some...
Tired of typing git push origin some-ugly-branch-name-with-ticket-number-and-project-reference? Just git deliver it 1#!/bin/bash
2# Save in a PATH-seen folder and it should be ready to go in git as git deliver
3# Pushes your current changes to origin/same-as-current-branch
4branch=$(git branch 2> /dev/null | sed -n -e 's/^\* \(.*\)/\1/p')
5git push origin $branch
-
Go to a branch, do stuff and git bac...
Go to a branch, do stuff and git back to where you were 1#!/bin/bash
2# Add this file with run permissions in a PATH-visible folder
3# Run it from a repository with `git back` to go back to the previous branch
4prev=$(git describe --all $(git rev-parse @{-1}) | sed 's/heads\///g')
5git checkout $prev
Something went wrong, please refresh the page to try again.
If the problem persists, check the GitHub status page or contact support.
If the problem persists, check the GitHub status page or contact support.