

# Your branch and 'origin/development' have diverged, Simply use the git push origin command on subsequent pushes of the new branch to the remote repo. Continue to perform Git commits locally on the new branch.
Perform a git push origin -uGit tells you about this right in the output for "git status": $ git status Follow these steps to have Git push a local branch to a remote repo: Create a new, local Git branch in your repository. This information helps tremendously in staying up-to-date. (b) if there are 4 commits on the remote upstream branch which you haven't pulled yet, then your local branch is "4 commits behind" its upstream branch. (a) if you have 2 commits in your local repository which you haven't pushed to the remote yet, then your local branch is "2 commits ahead" of its upstream branch. Will fail unless you manually run git fetch origin-push. In the popup menu, click the + icon, set upstream as the name, set the URL as the URL for the main repository on GitHub. Now when the background process runs git fetch origin the references on origin-push won’t be updated, and thus commands like: git push -force-with-lease origin-push. Git can now also tell you about unsynced commits which you haven't pushed or pulled, yet. git remote add origin-push (git config ) git fetch origin-push. To set up a local branch with a different name than the remote branch, you can easily use the first version with a different local branch name: git checkout -b sf origin/serverfix Branch sf set up to track remote branch serverfix from origin.

With an upstream branch set, you can simply use the shorthand commands "git pull" and "git push" - instead of having to think about the exact parameters like in "git push origin development".
GIT SET UPSTREAM URL UPDATE
This relationship is very helpful for two reasons: update origin pointing URL with set-url, like so: git remote set-url origin new-url rename the existing origin handler to something else via rename command. Let's also say that you've set the remote "origin/development" as its upstream branch. Do not use replacement refs to replace Git objects. If GITDIR environment is not set, it is set to the current working directory.-no-replace-objects. Treat the repository as a bare repository. Let's say that your current local HEAD branch is named "development". Equivalent to setting the GITNAMESPACE environment variable.-bare. Why should you set up an upstream branch for a local branch? In practice, however, in makes lots of sense to see them as counterparts - connected in a so-called "tracking connection". For Github: On a forked repo: origin or upstream: the upstream repo. In theory, local and remote branches in Git are completely separate items. In each repository, run the following commands: git remote set-url origin (git.
