# GitLab: Tracking changes in master.

**URL:** https://discourse.cmake.org/t/gitlab-tracking-changes-in-master/1494
**Category:** Development
**Created:** [July 6, 2020, 7:41pm UTC](https://discourse.cmake.org/t/gitlab-tracking-changes-in-master/1494 "2020-07-06T19:41:22Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Holger](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/h/ed8c4c/32.png) [@Holger](https://discourse.cmake.org/u/Holger)
#### Post date: [July 6, 2020, 7:41pm UTC](https://discourse.cmake.org/t/gitlab-tracking-changes-in-master/1494/1 "2020-07-06T19:41:22Z")

</div>

Hi,

I have forked the upstream CMake repository into a personal account and created a branch into which I committed stuff (following `CONTRIBUTING.rst`)

In the meantime, the upstream master has changed, but my forked project (and therefore my branch) doesn’t get the additional commits. I would like to rebase my branch onto the current upstream master, but Git always tells me “everything up to date”. Obviously, I have done something wrong here when setting up the branch.

How do I correctly track the upstream master?

---

<div class="post-metadata">

### Author: ![scivision](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/s/a87d85/32.png) [@scivision](https://discourse.cmake.org/u/scivision)
#### Post date: [July 6, 2020, 9:04pm UTC](https://discourse.cmake.org/t/gitlab-tracking-changes-in-master/1494/2 "2020-07-06T21:04:07Z")

</div>

Assuming you’re in the default branch of the repo that you forked:

```auto
git remote add upstream https://gitlab.kitware.com/cmake/cmake # one time

git fetch upstream
git rebase upstream/master

```

---

<div class="post-metadata">

### Author: ![marc.chevrier](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/m/ecb155/32.png) [@marc.chevrier](https://discourse.cmake.org/u/marc.chevrier)
#### Post date: [July 6, 2020, 9:08pm UTC](https://discourse.cmake.org/t/gitlab-tracking-changes-in-master/1494/3 "2020-07-06T21:08:10Z")

</div>

Personally, I had created the following alias in my ~/.gitconfig file:

```auto
[alias]
	# sync local branch with upstream
	sync = "!head=$(git head) && git fetch upstream && git rebase upstream/$head"

```

So, to synchronize, I do the following:

```auto
> git checkout master
> git sync
> git push

```

The last command to re-synchronize your personal remote master branch

---

<div class="post-metadata">

### Author: ![Holger](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/h/ed8c4c/32.png) [@Holger](https://discourse.cmake.org/u/Holger)
#### Post date: [July 6, 2020, 9:17pm UTC](https://discourse.cmake.org/t/gitlab-tracking-changes-in-master/1494/4 "2020-07-06T21:17:42Z")

</div>

@scivision, @marc.chevrier It worked. Thanks alot! 👍
