Make git aliases agnostic of git default branch name#120
Merged
Conversation
dmilon
commented
Aug 19, 2022
Comment on lines
+26
to
+27
| # Set remotes/origin/HEAD -> defaultBranch (copied from https://stackoverflow.com/a/67672350/14870317) | ||
| remoteSetHead = remote set-head origin --auto |
Contributor
Author
There was a problem hiding this comment.
If the git repo has not been cloned from GitHub but has been created locally instead, the remotes/origin/HEAD -> origin/master symbolic-ref doesn't exist and the git defaultBranch alias returns fatal: ref refs/remotes/origin/HEAD is not a symbolic ref
Running git remoteSetHead once will then set the symbolic-ref and the git defaultBranch will now work.
Member
|
🙌 |
bogumilo
added a commit
to bogumilo/dotfiles
that referenced
this pull request
Sep 15, 2022
Merge pull request lewagon#120 and branch changes
thmsmrl
added a commit
to thmsmrl/dotfiles
that referenced
this pull request
Oct 10, 2022
…-of-git-default-branch-name Make git aliases agnostic of git default branch name
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix #119