Differences between revisions 2 and 3
Revision 2 as of 2019-08-05 12:12:01
Size: 1530
Editor: NicoleThomas
Comment:
Revision 3 as of 2024-02-15 08:58:51
Size: 1587
Editor: NicoleThomas
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
#acl ClamsUserGroup:read,write,delete,revert All:read

Update local 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 master..origin/master
    git diff --name-status master origin/master
    git diff master origin/master
    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/master
      git pull
      Discard local changes for a specific file:
      git checkout -- filename

GitLabUpdateClams (last edited 2024-02-15 08:58:51 by NicoleThomas)