Skip to content

Commit

Permalink
Add 'cmaster' - checkout master or main as fallback
Browse files Browse the repository at this point in the history
For people working in projects with 'diverse' names of the base branch.
  • Loading branch information
szpak committed May 8, 2023
1 parent c845181 commit 8e2a9fc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
###### Inny sposób prezentacji wszystkich branchy - jeszcze bardziej szczegółowy
git branches

###### Przełącza na mastera, a jak go nie ma to na maina - dla ludzi pracujących z projektami ze zróżnicowaniem (ang. diversity) nazw głównych branchy
git cmaster

###### Odkłada na bok zmiany razem z plikami nie śledzonymi
git sth

Expand Down
1 change: 1 addition & 0 deletions config
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
difff = diff --color-words #just words
bbranch = branch -v
branches = branch -avvl
cmaster = "!sh -c 'git show-ref --quiet refs/heads/master && git checkout master || git checkout main'"
sth = stash -u
unstage = reset HEAD --
alias = !git config --list | grep 'alias\\.' | sed 's/alias\\.\\([^=]*\\)=\\(.*\\)/\\1 => \\2/' | grep -v 'alias'| awk 'BEGIN { FS = \"=>\" }{ printf(\"%-20s=>%s\\n\", $1,$2)}'|sort
Expand Down

0 comments on commit 8e2a9fc

Please sign in to comment.