The case is as follows:
- I have a remote repository where all changes are pushed.
- I have a server, where changes and updates are received from the remote repository.
So far everything normal.
Now, when it is executed on the server, it git pull origin master
brings the changes without problems, but it leaves the master branch in a previous state of the update.
Log example:
* 985d0f0b (HEAD, tag: 1.3.1, origin/master) Merge branch 'name-branch'
|\
| * e9cb9ca9 ...
| * ...
|/
* 49ceaa65 (tag: 1.3.0) Merge branch 'name-branch-1.3.0'
|\
| * 4051d017 ...
| * 441d058b ...
|/
| * af735db0 ...
* 57cce37a (tag: 1.2.0, master) Merge branch 'name-branch-1.2.0'
- As you can see the master branch is with the 1.2.0 tag .
- The HEAD I move to tag 1.3.1 with
git checkout 1.3.1
The question is the same as the title:
How to position the master branch in the most recent commit?
It should be like this:
* 985d0f0b (HEAD, tag: 1.3.1, master, origin/master) Merge branch 'name-branch'
|\
| * e9cb9ca9 ...
| * ...
|/
* 49ceaa65 (tag: 1.3.0) Merge branch 'name-branch-1.3.0'
|\
| * 4051d017 ...
| * 441d058b ...
|/
| * af735db0 ...
* 57cce37a (tag: 1.2.0) Merge branch 'name-branch-1.2.0'