Including information on how to add changes to the remote repo and how to push them.
This commit is contained in:
1 parent
b68d499409
commit
c188e94e1e
1 file changed
+5
-1
@@ -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.
|
||||
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`.
|
||||
Reference in new issue
Block a user