9/22/2023 0 Comments Github cli pushFor example, I don't want gh to do git push -u origin my-feature when I open a pull request, because this defeats the purpose of the above configs the "upstream" should stay upstream/master.ĮDIT: here is a GitHub blog post dating from the release of Git 2. So it would be great if gh could understand this workflow a little bit more. So it enables a pretty cool workflow in my opinion, which feels really "natural". Git pull # (does `git pull upstream master`) Git merge # no other arguments needed! (does `git merge upstream/master`) # or in one step: Git pull -rebase # (does `git pull -rebase upstream master`) # or if your project's workflow uses merge: ![]() ![]() Git rebase # no other arguments needed! (does `git rebase upstream/master`) # or in one step: Git fetch # no other arguments needed! (does `git fetch upstream`) Git push # no other arguments needed ! (does `git push origin my-feature`) # work work work # rebase on latest master # work work work # push my branch to my fork To push the current branch and set the remote as upstream, use git push -set. git push fatal: The current branch main has no upstream branch. Git checkout -b my-feature upstream/master Installed GitHub CLI, setup a brand new repo to test this out, and the problem still persists Have been searching all over docs and on the internet for the past 3 hours, its driving me nuts. Define aliases for commands that you commonly run. For example, enter gh config set editor 'code -w' to set your preferred text editor to Visual Studio Code. ![]() # first time only: change default push behaviour to 'current' Next steps Tell GitHub CLI which text editor to use for commands that open a text editor. # first time only: setup 'origin' as the default push remote (I usually fork on GitHub, then clone my fork) To push changes using GitKraken Client’s CLI, open the terminal tab by selecting the Terminal button from the top toolbar.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |