1/23/2024 0 Comments Git set upstream of current branch![]() ![]() Then the issue is that you have not configured git to always create new branches on the remote from local ones. The easiest way to set the upstream branch is to use the git push command with the -u option for upstream branch. git push -set-upstream origin .To push the current branch and set the remote as upstream, use. The git user can select the location of the local branch and modify the default remote branch by setting the git upstream branch. To push the current branch and set the remote as upstream, you can use: git. fatal: The current branch has no upstream branch. This configuration will tell git to show the relationship between the two branches in git status and git branch -v. åªååºä»æå®çæ交ï¼å¦æ没ææå®ï¼å为HEADï¼å¯ä»¥å°è¾¾çåæ¯çæ示ãæå³ç -listã -no-merged When creating a new branch, set up branch..remote and branch..merge configuration entries to mark the start-point branch as 'upstream' from the new branch.There's a bit of a chicken-and-egg problem here. ![]() Without a branch name, as in git branch -set-upstream-toorigin/xyzzy, this will set the upstream of the current branch, which then should probably be xyzzy. Reference git branch -set-upstream-to sets the default remote branch for the current local branch. Using git branch -set-upstream-toorigin/B B will set the upstream of B appropriately.设置çè·è¸ªä¿¡æ¯ï¼ä½¿è¢«è§ä¸ºçä¸æ¸¸åæ¯ãå¦æ没ææå®ï¼åé»è®¤ä¸ºå½ååæ¯ã -unset-upstream 6 Answers Sorted by: 652 To avoid confusion, recent versions of git deprecate this somewhat ambiguous -set-upstream option in favor of a more verbose -set-upstream-to option with identical syntax and behavior. git/config << EOF branch 'master' remote. My workaround for this issue is manual editing of. ç±äºè¿ä¸ªé项çè¯æ³æ··ä¹±ï¼ä¸åæ¯æã 请使ç¨`-track`æ`-set-upstream-to`代æ¿ã -u -set-upstream-to= And strace displays correct locating and reading of the upstream branch ref, then however it's ignored for some reason. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |