Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Cover image for Copy the name of your current branch
Domenik Reitzner
Domenik Reitzner

Posted on

     

Copy the name of your current branch

I just wanted to share a quick helper that I have been using for a while.

History

One of the projects I work at has some nicely set up development servers (different variations of cms and business api).

So whenever we need to test a specific configuration on a feature that we are developing, we will put that branch on one of the development servers. For that to happen we need to adapt the configuration inside of the build server and change the branch name.

So after multiple times of changing the branch name, waiting for the build to finish, testing on the server, not seeing my changes and finding out, that I had a typo in the name, I decided I'd hunt for a better solution.

The easy fix I've used ever since.

This is the easy solution I found:

//windowsgitbranch--show-current|clip
Enter fullscreen modeExit fullscreen mode
// macOSgit branch--show-current | pbcopy
Enter fullscreen modeExit fullscreen mode

I hope ths makes your live easier and you can focus more of your time on the things you love to do.

Credits

cover:https://unsplash.com/@yancymin

Top comments(0)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

Christian, husband, father of four, web-enthusiast, Sveltian, musician and blogger.
  • Location
    Vienna
  • Education
    School for mechatronics with emphasis on robotics
  • Work
    Senior Frontend Developer @ woom
  • Joined

Trending onDEV CommunityHot

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp