Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GitHub for Windows does not see changes in repository

Tags:

git

github

I have created a repository using GitHub for Windows (GfW) and added 3 commits and synced using aforementioned. Commits were visible on GitHub webpage and in my app. Then my brother forked my project to start collaborating with me. He successfully cloned it using GfW.

Then I made changes on my machine and pushed using "sync" button. Changes appeared on webpage and in my history, but my brother can't see them in his GfW. Even after pressing "sync".

What mistake are we making? I have also added him to collaborators in my project's settings, though it did not change anything. I guess I have misunderstood some basic principles.

like image 888
bowl Avatar asked Jul 10 '15 10:07

bowl


People also ask

How do I see changes in local repository?

From the context menu of the dialog you can show a diff of the changes. Check the local changes you made using Context Menu → Compare with Base. Check the changes in the repository made by others using Context Menu → Show Differences as Unified Diff. You can also revert changes in individual files.

How do you see what files were changed in git?

Find what file changed in a commit To find out which files changed in a given commit, use the git log --raw command. It's the fastest and simplest way to get insight into which files a commit affects.


2 Answers

Well, there are four repositories involved here:

  • Your github one
  • Your local clone of your github project
  • Your brother's github fork
  • Your brother's local clone of his fork

I haven't used GfW myself for a little while, but I suspect that Sync is only synchronizing between the last two projects listed above. I don't know whether there's GUI support for it or not, but the documentation on syncing a fork may be useful to you.

I suspect there isn't support for syncing a fork with the original though, given this documentation:

GitHub for Windows does not support multiple Git remotes and it will only work with the origin remote. If you wish to push & pull to other remotes, we suggest you use the command line client that is included with the application.

Your brother will effectively have two remotes: his fork (typically named "origin") and your original project (typically named "upstream").

like image 85
Jon Skeet Avatar answered Oct 19 '22 11:10

Jon Skeet


There are ways of using two forked projects for this, but it's going to get messy very quickly. You're probably best using just one github project and both cloning that.

Your brother could simply clone your original project and make his changes on his machine.

Then, when you push to github, he'll can pull and because he's looking at same remote repository you pushed to he'll get the changes.

You will need to give your brother permission to push to the project to collaborate easily so that you can get the changes he's making too.

like image 25
Jim T Avatar answered Oct 19 '22 11:10

Jim T