![]() ![]() # and have 2 and 3 different commits each, respectively. # Your branch and 'origin/development' have diverged, Git tells you about this right in the output for "git status": $ git status 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. If there is no upstream branch configured and the Git repository has remotes set up, the Publish action is enabled. The purpose of setting upstream is to make git push and git pull easier. The local branch is called the tracking branch, the branch it tracks - the remote branch is called the upstream branch. Git can now also tell you about unsynced commits which you haven't pushed or pulled, yet. Git calls set upstream to establish this kind of relationship. 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". This relationship is very helpful for two reasons: Let's also say that you've set the remote "origin/development" as its upstream branch. Let's say that your current local HEAD branch is named "development". 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". We can add database and device connections, users and roles, adjust alarm settings, set up security, create a schedule for a Gateway backup to be taken automatically at specific times, and much more. In theory, local and remote branches in Git are completely separate items. This is where most of the settings that affect the whole Gateway are set up.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |