mirror of
https://github.com/namibia/tips.git
synced 2025-02-02 11:38:25 +00:00
Get the name of the current branch
This commit is contained in:
parent
c0faf65fc9
commit
affd2f840a
@ -61,6 +61,7 @@
|
||||
* [Get latest changes in your repo for a linked project using subtree](https://github.com/git-tips/tips#get-latest-changes-in-your-repo-for-a-linked-project-using-subtree)
|
||||
* [Export a branch with history to the a file.](https://github.com/git-tips/tips#export-a-branch-with-history-to-the-a-file)
|
||||
* [Import form a bundle](https://github.com/git-tips/tips#import-form-a-bundle)
|
||||
* [Get the name of current branch.](https://github.com/git-tips/tips#get-the-name-of-current-branch)
|
||||
|
||||
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
|
||||
<!-- @doxie.inject end toc -->
|
||||
@ -431,5 +432,10 @@ git bundle create <file> <branch-name>
|
||||
git clone repo.bundle <repo-dir> -b <branch-name>
|
||||
```
|
||||
|
||||
## Get the name of current branch.
|
||||
```sh
|
||||
git rev-parse --abbrev-ref HEAD
|
||||
```
|
||||
|
||||
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
|
||||
<!-- @doxie.inject end -->
|
||||
|
Loading…
x
Reference in New Issue
Block a user