From c188e94e1e8bfc46768d18c48dd472960e1d3384 Mon Sep 17 00:00:00 2001 From: daviditschan Date: Tue, 9 Jun 2026 10:54:46 +0200 Subject: [PATCH] Including information on how to add changes to the remote repo and how to push them. --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 674f66e..02d446d 100644 --- a/README.md +++ b/README.md @@ -37,4 +37,8 @@ ssh -T git@gitea.psi.ch 2. To create a local repository, clone the remote one via `git clone git@gitea.psi.ch:tschan_d/Master_Thesis.git`. This command creates a new local folder named `repo`, initialises a git repo within it, a remote named `origin` is created, pointing to the connected server, all of the files and and commits are downloaded and the default branch is checked out. 3. Use `git fetch git@gitea.psi.ch:tschan_d/Master_Thesis.git` to retrieve new work on the remote, without merging everything into the local branches. 4. use `git merge REMOTE-NAME/BRANCH-NAME` to merge a remote branch with the local branch. -5. Steps 3 and 4 may be executed more succinctly via `git pull REMOTE-NAME BRANCH-NAME` to grab online updates and merge them into the local branches. \ No newline at end of file +5. Steps 3 and 4 may be executed more succinctly via `git pull REMOTE-NAME BRANCH-NAME` to grab online updates and merge them into the local branches. +6. Local work may be added in a snapshot using either `git add .` to add all files under the current directory to the index, or using specific files `git add file1 file2`. It can be checked what is to be committed using the `git diff --cached`. If `--cached` is omitted, `git diff` will show any changes made but not yet added to the index. +7. Run `git commit`, which will prompt for a message describing the made changes, and then record a new version of the project. +8. To combine steps 6 and 7, run `git commit -a` to notice any modified (but not new) files, add them to the index, and commit. +9. To get an overview over the history, run `git log` or `git log -p`. It may be useful to run `git log --stat --summary`. \ No newline at end of file