]> rtime.felk.cvut.cz Git - hubacji1/oneflow.git/commitdiff
Add remote docs
authorJiri Hubacek <hubacji1@fel.cvut.cz>
Thu, 28 Jun 2018 06:07:40 +0000 (08:07 +0200)
committerJiri Hubacek <hubacji1@fel.cvut.cz>
Thu, 28 Jun 2018 06:07:40 +0000 (08:07 +0200)
- Add outline.
- Add remote, update info.
- Add cheat sheet.

remote.md [new file with mode: 0644]

diff --git a/remote.md b/remote.md
new file mode 100644 (file)
index 0000000..327cbb2
--- /dev/null
+++ b/remote.md
@@ -0,0 +1,27 @@
+# Remote
+The repository may be stored on remote, usually a server. The remote is added
+automatically when `git clone` and needs to be added manually by `git remote
+add NAME URL` when `git init` used.
+
+The main remote is usually named `origin`.
+
+# Update - copy the repository changes
+When copying repository history to the server, `git push` command is used. If
+copying from the server to local repository clone, `git pull --rebase` is the
+proper command.
+
+This `--rebase` options first download all new changes in repository on server
+and on top of them then apply local changes. Even that timestamp info is
+forgotten (so the local changes looks like has been done just after copying
+repository from server is finished) it is preffered over `git pull` because the
+history is cleaner.
+
+# Cheat sheet
+Use `git COMMAND --help` for showing the help!
+
+## Remote
+- `git remote add NAME URL`
+
+## Update
+- `git push`
+- `git pull --rebase`