![]() This warning persists even today, in Git 2. Meanwhile, for a "transition period" while everyone adjusts to the newfangled Git 1.7 behavior, you may also get a warning, or extra explanation, when there is an upstream. Right now, if there is no upstream, the HEAD test is used instead of the upstream test. What if there is no upstream? Well, that's where "changed in 1.7" comes in: the original test was not T ≤ U but rather T ≤ HEAD. If the answer to question 2 is yes (i.e., T ≤ U), the deletion is permitted. The upstream branch name also points to one specific commit (call this commit U). The branch name points to one specific commit (let's call this T for Tip). What is the upstream name for the branch we propose to delete? (If none, see below.).Hence, there are two-or sometimes three, if you look at the above commit-questions that you (or Git) must answer to see whether -d is permitted: to delete the local branches pointing to merged branches. ![]() Is merged with the other branch it merges with. git branch D branch-name (delete from local) git push origin :branch-name (delete from remote) Then when users went to pull changes, they needed to do the following. Safety, whose purpose is not to lose commits that are not merged to otherīranches, on the current branch. Set to 'refs/heads/next'), it makes little sense to base the "branch -d" Merges from and pushes back to origin's 'next', with '' When a branch is marked to merge with another ref (e.g. This test was changed in Git version 1.7 (which means everyone should have it today, but check your Git version), in commit 99c419c91554e9f60940228006b7d39d42704da7 by Junio C Hamano:īranch -d: base the "already-merged" safety on the branch it merges with The question is instead "is the branch merged into ?" The key question for git branch -d (delete without forcing 1) is not "is the branch merged?", because that question is literally un-answerable. You are receiving this because you were mentioned.There are several different tricky bits here. Reply to this email directly, view it on GitHub I can make a new release 7.2.1 containing this fix shortly after. Git clone -depth 1 -branch issue-96-be-rebust-towards-git-config-options-with-no-assignment Warning-like output for those keys as well in pull request #97Īny chance you could give the fix from the pull request a spin? One way toĬheck the fixed version out would be something like: Git-delete-merged-branches robust towards those cases and to also produce It is unclear to me why Git is serving an arguably malformed entry(?) in gitĬonfig -list -null output but I have prepared a fix to make My guess is that thatĬan only be cause from manual editing and not from calls to git config Turned out to be alias.bb that lacks an assignment. ![]() Thanks for sharing that Git config of yours! □ The troublemaker in there On Fri, at 1:03 PM Sebastian Pipping wrote: # Only pull if no merge required do this so can then rebase insteadĭriver = git-nbmergedriver merge %O %A %B %L %PĬmd = git-nbdifftool diff \"$LOCAL\" \"$REMOTE\"Ĭmd = git-nbmergetool merge \"$BASE\" \"$LOCAL\" \"$REMOTE\" \"$MERGED\" # update_master = fetch origin master:master Oldest-ancestor = !bash -c 'diff -u \nor track again with: git update-index -no-assume-unchanged 'ĭhr = diff = fetch -tags -all -quiet -pruneĮxistremote = ls-remote -heads = reset -hard Pn = !sh -c "git name-rev $(git rev-parse -name-only" # previous branch _name_ Rt = rev-parse -abbrev-ref -symbolic-full-name = diff -name-only -diff-filter=Uīp = describe -all = !git checkout master & git pull origin master & git checkout -b $ & : Sbd = status -s -b -ignore-submodules=dirty So, the first thing to try is to look at the reflog using the command git reflog (which displays the reflog for HEAD). Most of the time unreachable commits are in the reflog. Notmaster = "log -color -graph -pretty=format:'%C(auto)%h%Creset -%C(auto)%d%Creset %s %C(#f449ee)(%cr) %C(#f48d49)%C(reset)' -abbrev-commit -no-merges '^origin/master'" Finding commit hash with the command line When your commits are in the reflog. ![]() # Please adapt and uncomment the following lines: # This is Git's per-user configuration file.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |