Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated the git command for getting branch name. Previous code was so… #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tmwllc
Copy link
Contributor

@tmwllc tmwllc commented Nov 6, 2018

…metimes getting the tag name instead of the branch name.

…metimes getting the tag name instead of the branch name.
@coveralls
Copy link

Coverage Status

Coverage remained the same at 94.382% when pulling f259001 on feature/branch-name into 0b1a23e on master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage remained the same at 94.382% when pulling f259001 on feature/branch-name into 0b1a23e on master.

@tmwllc tmwllc assigned tmwllc and unassigned oifland, andyday, mollases and steinbergkh Nov 6, 2018
@oifland
Copy link

oifland commented Nov 7, 2018

I'm not sure if this will do what we want. Just trying the commands out on my local computer...

$ git checkout 0.25.86
Note: checking out '0.25.86'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD is now at 90117aa6... Merge branch 'feature/kafka-fix' into 'master'
$ git rev-parse --abbrev-ref HEAD
HEAD
$ git name-rev HEAD --name-only
tags/0.25.86

Are we assuming that the tag is on the HEAD?

@tmwllc
Copy link
Contributor Author

tmwllc commented Nov 7, 2018

I'm not sure there is a git command to return the branch you're on if you checkout a tag or a commit. The old code doesn't return the branch name in that scenario either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants