#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
}}}