Adam Amin
Adam Amin

Reputation: 1456

git pull changes automatically from a remote repository

I am working on a project on a remote repository A which I don't have an access to push to. I had to make a copy of the project in a my own remote repository B so that I can work on the project. The main contributors to the project keep adding and changing in the project and they push their changes to the repository A. My question what is the best way to keep pulling their changes automatically into my remote repository B without making any conflicts?

Upvotes: 1

Views: 1042

Answers (1)

nowox
nowox

Reputation: 29096

This is not something you usually want to do. Git is distributed source control management system. It is meant to be used even when you have no connection to your remote (working on a train, on a plane, ...).

So there is absolutely no reason why you want to keep pulling changes.

To answer you question, you must understand that git pull is in fact two commands in one git fetch followed by git merge, this mean you cannot do git pull on a branch you are working on because your working copy is dirty and you might have conflicts.

However you can do git fetch to see if somebody has made some changes on the remote. If its the case, Git will kindly remind you this Your branch is currently ahead of 1 commit....

Upvotes: 1

Related Questions