Home > Mobile >  Shorten long branch names in Git
Shorten long branch names in Git

Time:10-07

My shop has an obnoxiously long branch name convention:

users/full.name/wi-1234-0

Is there a way that I can type git commands without having to type this entire branch name hundreds of times? Something like %branch34-0 where branch here is the users/full.name/wi- part. Where I can specify the work item number.

I prefer to use command line to UI because I have more control. I just don't want to keep typing these enormous branch names.

CodePudding user response:

In your own repo you can use whatever names you want. git checkout -tb whatever origin/users/full.name/wi-1234-0, that will set up the default pull, for pushing you'll need to git config push.default upstream because you're not a newbie any more.

  •  Tags:  
  • git
  • Related