Differences between revisions 1 and 2
Revision 1 as of 2019-10-11 09:14:25
Size: 1530
Editor: NicoleThomas
Comment:
Revision 2 as of 2019-10-14 09:15:35
Size: 1529
Editor: NicoleThomas
Comment:
Deletions are marked like this. Additions are marked like this.
Line 59: Line 59:
git reset --hard origin/master git reset --hard origin/devel

Update local MESSy-CLaMS repository

Get changes from remote repository

  • Fetch and merge changes on the remote server to your working directory:
    git pull

See changes before pulling from remote git repository

  • Fetch changes from the remote repository:
    git fetch
    Show commit logs of changes / show diffs of changes:
    git log --name-status devel..origin/devel
    git diff --name-status devel origin/devel
    git diff devel origin/devel
    Apply the changes by merge or just pull the changes:
    git merge 
    or
    git pull

Merging with local modification

  • If you pull from the remote repository and there are local uncommitted modifications in files that have also been changed in the remote repository, you will fail and get a message like this: "Please, commit your changes or stash them before you can merge."

    Then you have three options:

    1. Commit changes
      git add ...
      git commit ...
      git pull
    2. Stash changes

      Stashing acts as a stack, where you can push changes, and you pop them in reverse order. Stash, do the merge and then pull the stash:

      git stash
      git pull
      git stash pop
    3. Discard changes

      Discard all local changes to all files and get current version from remote repository:

      git reset --hard origin/devel
      git pull
      Discard local changes for a specific file:
      git checkout -- filename

messy/Update (last edited 2019-10-14 09:15:35 by NicoleThomas)