These options can be omitted, however, if a with a remote branch is set up. Use git push to push commits made on your local branch to a remote repository. Or you could force it: git config branch. Sign up for a free GitHub account to open an issue and contact its maintainers and the community. Specify multiple values to get an octopus merge. For example, once you do a git push -u origin master, you can later call git pull and git will know that you actually meant git pull origin master.
So I think the problem here is that we don't respect the push. When you do a git pull from a branch, without specifying a source remote or branch, git looks at the branch. Because of this, git push deletes the branch on the remote repository. Otherwise it will be rejected. For more information, see branch. It would be helpful to us if you could give us some background on the workflow that made you create the branch on the command line to begin with.
Hmm, I'm reconsidering this now. Have a question about this project? Perhaps a good approach would be to add this functionality to the branch dashboard. Force May discard unknown changes This allows remote repository to accept an unsafe non-fast-forward push. Since git does not have remote-tracking tags, tags cannot be overwritten using this option. It didn't seem to have any effect at all. From for git push: -u --set-upstream For every branch that is up to date or successfully pushed, add upstream tracking reference, used by argument-less git-pull 1 and other commands.
Ensure the remote exists first: git remote -vv Set the preferred remote for the current checked out branch: git branch --set-upstream-to Validate the branch is setup with the correct upstream remote: git branch -vv Just a clarification using git version 1. This can cause the remote repository to lose commits; use it with care. I still get: fatal: No configured push destination. It would be helpful to us if you could give us some background on the workflow that made you create the branch on the command line to begin with. A remote tracked branch can be set using the reference browser cf. Have a question about this project? See git-pull 1 for details. I'm going to label this future-proposal and we're happy to hear more feedback from the community and core contributors on this such that we can come back and re-evaluate it as part of our next planning session.
You then showed that git push -u origin test removes the ambiguity. This can be overridden in this dialog by using one of the Always push to the selected remote. Push This section talks about how to push i. Check: Checks if the bounded commits of all submodules are present on the remote repositories. If yes, a force push will be performed.
You can find more information at. . I also tried to play with: git remote set-url --push myfork origin and other options but none seem to work maybe because I deleted the origin remote too soon? It does look like the default configuration for push. If any of the submodules are not pushed, the superproject push will fail. Alright, you have me convinced : Just added this now. Also it should be noted that the push. This can cause the remote repository to lose commits; use it with care.
To do this, you must do the following: First, verify that you have this problem, i. If the current branch or the selected local branch has a remote tracked branch set, the remote branch and remote repository are automatically selected. Can you identify anything stupid happening here? Naturally, I thought it made sense to branch directly off the upstream master, but I have an uneasy feeling about automating this for some reason. I want to change the Git default remote branch destination so I could just git push Instead of: git push upstream Currently this is set to the origin remote and I want to set it to a different remote. Include Tags Also push tags to remote repository. The command resembles the same steps you'd take to rename a branch. Remote: The remote branch of the other repository.
Note that tracking information has been set up so that git pull works as expected without specifying the remote or branch. GitHub Desktop will respect that tracking branch as part of pushing. To push a single tag, you can issue the same command as pushing a branch: git push To push all your tags, you can type the command: git push --tags Deleting a remote branch or tag The syntax to delete a branch is a bit arcane at first glance: git push : Note that there is a space before the colon. It checks if the server branch points to the same commit as the remote-tracking branch known changes. Following the I tried to change: git config push. Branch Local: The source branch which will be pushed to the other repository.
I tried to remove the original cloned from remote git remote rm origin Which did remove the original remote. Not opposed to this but why don't we consider this an error condition of a normal push and handle it well? By default, when you checkout a new branch, and you are using a remote branch as the starting point, the upstream tracking branch will be setup automatically. Similarly, git pull is unambiguous and git pull relies on the branch config. Please specify which branch you want to use on the command line and try again e. What is important here is that this lets you do a git pull without supplying any more arguments. Edit: However, I am open to adding an optional keyword param to the git: push Window command handler. While it might seem like we could just do git push.
If the submodules are not pushed yet, it will try to push them. If you are not, you probably want to read the section about them in the Pro Git book. Version GitHub Desktop version: 0. If you wish to setup git pull so that it merges into from another branch in the local repository, you can point branch. Options Force May discard known changes This allows remote repository to accept a safer non-fast-forward push. Since this doesn't look like a scenario you could get into without going to the command line I'm not going to classify this as a bug and by the looks of how complex this issue is we're not going to be able to spend time on it as part of our.