Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jgit-dev] Issue in Using JGit PullCommand


thanks for the help. I managed to resolve the issue. I was using SVN all this time before trying out git. And it is hard to completely get rid of some SVN-based principles that I'm used to. It was a conceptual issue with my understanding of git. now it is fine :)

On Sat, Nov 17, 2012 at 12:41 AM, Matthias Sohn <matthias.sohn@xxxxxxxxxxxxxx> wrote:
2012/11/16 Isuru Haththotuwa <isurulucky@xxxxxxxxx>

I tried out obtaining the results as follows:

             PullResult result =;

            FetchResult fetchResult = result.getFetchResult();
            MergeResult mergeResult = result.getMergeResult();
            MergeResult.MergeStatus status = mergeResult.getMergeStatus();


I got the results as pull is successful, and the status name as ALREADY_UP_TO_DATE, and nothing from the fetchResult. I'm baffled how the repository doesn't have all the files as the remote repository, but still says that it is already up to date. Let me briefly explain the directory structure that I have in the remote repository as well:

root ____ README file
  |______ directory_1
  |            |__________ file_2 
  |            |__________ file_3

Currently, my local repo only has the README file . After the pull command, the other directory and the files are not updated in it. However, if I delete the complete tree and get a clone, all the files with the directory structure are reflected in the local repo. Any insight on this is greatly appreciated.

- which is your current branch (HEAD is pointing at) when calling pull ?
- check if your .git/config contains an entry similar to

remote.origin.url="" to the upstream repository you cloned>

for the local branch which is checked out before you run pull


Thanks and Regards,

Back to the top