# Github: how to sync repositories?

**URL:** <https://discourse.cataclysmdda.org/t/github-how-to-sync-repositories/9019>\
**Category:** The Toolbox\
**Created:** [March 1, 2015, 6:42am UTC](https://discourse.cataclysmdda.org/t/github-how-to-sync-repositories/9019 "2015-03-01T06:42:49Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Murphy](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/murphy/32/2371_2.png) [@Murphy](https://discourse.cataclysmdda.org/u/Murphy)\
**Post date:** [March 1, 2015, 6:42am UTC](https://discourse.cataclysmdda.org/t/github-how-to-sync-repositories/9019/1 "2015-03-01T06:42:49Z")

</div>

I forked the repository a while ago and I can’t figure out how to properly sync it with the baseline.

I created a pull request from the baseline to my fork and merged it but it now says that my fork “is 1 commit ahead of CleverRaven:master”. This seems wrong. I can’t undo it either.

Any help I can find refers me to the use of git command-line utility, but I do not use git locally. And even if I started, I would still need to fix the problem. Must I delete my fork and create it anew?

---

<div class="post-metadata">

**Author:** ![Coolthulhu](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/coolthulhu/32/2446_2.png) [@Coolthulhu](https://discourse.cataclysmdda.org/u/Coolthulhu)\
**Post date:** [March 1, 2015, 8:26am UTC](https://discourse.cataclysmdda.org/t/github-how-to-sync-repositories/9019/2 "2015-03-01T08:26:52Z")

</div>

As far as I recall it goes like this:

[ol][li]Fork on github[/li]  
[li]`git clone http://link.to.fork`[/li]  
[li]Set up an upstream branch with `git remote add upstream http://link.to.base-dda-repo`[/li]  
[li]To update: git pull upstream master[/li]  
[li]To update own branch: switch to it with `git checkout branchname`, then `git merge master`[/li]  
[li]Push own branch to fork’s repo with `git push -u all` or `git push -u origin branchname`, or if you’ve done one of those before, just `git push`[/li][/ol]

---

<div class="post-metadata">

**Author:** ![Murphy](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/murphy/32/2371_2.png) [@Murphy](https://discourse.cataclysmdda.org/u/Murphy)\
**Post date:** [March 1, 2015, 8:57am UTC](https://discourse.cataclysmdda.org/t/github-how-to-sync-repositories/9019/3 "2015-03-01T08:57:01Z")

</div>

So I can’t do it without installing git on my system?

---

<div class="post-metadata">

**Author:** ![Coolthulhu](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/coolthulhu/32/2446_2.png) [@Coolthulhu](https://discourse.cataclysmdda.org/u/Coolthulhu)\
**Post date:** [March 1, 2015, 9:11am UTC](https://discourse.cataclysmdda.org/t/github-how-to-sync-repositories/9019/4 "2015-03-01T09:11:28Z")

</div>

You can try the github git application or some other git distribution (nothing online I’m afraid). The steps should be similar.  
Though having a minimal git environment is very useful, especially on windows which doesn’t come with a good file search application.

---

<div class="post-metadata">

**Author:** ![Murphy](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/murphy/32/2371_2.png) [@Murphy](https://discourse.cataclysmdda.org/u/Murphy)\
**Post date:** [March 1, 2015, 12:44pm UTC](https://discourse.cataclysmdda.org/t/github-how-to-sync-repositories/9019/5 "2015-03-01T12:44:45Z")

</div>

Yeah it won’t let me push because “Updates were rejected because the remote contains work that you do not have locally”. Guess I shouldn’t have tried to sync by creating a pull request from CleverRaven/master to my fork/master.

Alright, I’m deleting my fork and re-creating it then.
