Skip to content

Instantly share code, notes, and snippets.

@degrammer
Created July 11, 2023 17:26
Show Gist options
  • Save degrammer/f30c3fcc53460edce70573cc55057660 to your computer and use it in GitHub Desktop.
Save degrammer/f30c3fcc53460edce70573cc55057660 to your computer and use it in GitHub Desktop.
Git productivity configuration
# This is Git's per-user configuration file.
# Use this git configuration file to use some handy commands in your day-to-day work
[user]
name = <YOUR NAME HERE>
email = <YOUR EMAIL HERE>
[alias]
wip = !read -p \"Enter issue number: \" issue && read -p \"What feature are you working on?:\" name && git checkout -b \"wip/bencho/$issue-$name\"
ready = !git branch -m \"$(git branch --show-current | sed \"s/wip\\///g\")\"
copy = !git branch --show-current | pbcopy
alias = !git config --get-regexp alias
ls = !git branch --list | grep "wip"
cp = !git branch --show-current | pbcopy
main = !git branch --show-current | pbcopy | git checkout main
[init]
defaultBranch = main
@degrammer
Copy link
Author

A small set of useful git commands to automate your workflow.

💻 Commands:
git ls : list work in progress (wip) branches
git wip: start a new work in progress branch
git ready: set branch as ready by removing the wip prefix
git main: checkout to the main branch while copying the current branch name

🎥 Demo

git-demo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment