suppose i have a file with version 4 and the same file on the remote repository server is version 8. I would like to get the list of versions for the project/file.
Then i would like to merge my file with may be version 6.
how would i got about doing this
Thanks
Note that in git, each version (commit) describes the complete state of your repository, rather than versioning on a per-file basis.
You can do something like what you want with the following commands:
This updates all your “remote-tracking branches” from the remote repository referred to as
origin. You can think of this as like updating the state of your local cache of all the branches from origin.Then the following command will then list all the commits that introduced changes to the the file
docs/foo.txtthat you don’t have in your current branch locally:The
-poption says to also include a full diff between versions in the output. You can leave that out for more concise output that just shows you the commit messages.