Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision |
services:rcs:start [2014/12/12 13:50] – added switch --shared to git init, this helps users of shared repos to not shoot themselved in the foot behrmj87 | services:rcs:start [2014/12/12 14:00] – [Short summary of useful git commands] glaubitz |
---|
| |
{{:services:rcs:git-grouphome-step8.png|}} | {{:services:rcs:git-grouphome-step8.png|}} |
| |
| Now, we just create a second file as described in the section above. Then use ''git status'' to verify, ''git add'' to add and ''git commit'' to commit our changes. Then we issue ''git push origin master'' to eventually push the changes to the server. |
| |
{{:services:rcs:git-grouphome-step9.png|}} | {{:services:rcs:git-grouphome-step9.png|}} |
| |
| Changing back to the first user who just needs to call ''git pull'' to synchronize (//pull// in git speak) the new changes and check the commit history with ''git log''. |
| |
{{:services:rcs:git-grouphome-step10.png|}} | {{:services:rcs:git-grouphome-step10.png|}} |
| |
| |
| |
| ===== Short summary of useful git commands ===== |
| |
| * ''git init <repository>'' - create a git repository in the current folder with the name //repository// (add ''--bare'' for server repositories) |
| * ''git clone <URL to git repository>'' - clone a local working copy of a remote repository |
| * ''git pull'' - check the remote repository for new changes and retrieve them |
| * ''git add <file>'' - add a new file to the git repository (requires commit) |
| * ''git status'' - view current status of the repository including files which are untracked and files to be committed |
| * ''git commit -m <commit message>'' - commit all staged changes |
| * ''git stash'' - revert all changes made since the last commit were made |
| * ''git remote'' - list and modify remote repositories |
| * ''git branch'' - list and modify development branches |
| * ''git diff commitID1..commitID2'' - view changes between two commits |