|
|
@ -13,10 +13,7 @@ The client is pretty simple to understand.
|
|
|
|
With only a handfull of commands you should be able to get your versioning going.
|
|
|
|
With only a handfull of commands you should be able to get your versioning going.
|
|
|
|
For servers with web interfaces there are different cli tools to control it
|
|
|
|
For servers with web interfaces there are different cli tools to control it
|
|
|
|
without using a browser.
|
|
|
|
without using a browser.
|
|
|
|
For most linux distributions it is packaged with the `git` package
|
|
|
|
For most linux distributions it is packaged with the `git` package.
|
|
|
|
|
|
|
|
|
|
|
|
There is also an interactive
|
|
|
|
|
|
|
|
[fixup guide by Seth Robertson](https://sethrobertson.github.io/GitFixUm/fixup.html).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
### Server
|
|
|
|
### Server
|
|
|
|
|
|
|
|
|
|
|
@ -45,6 +42,11 @@ If you don't need a bloated web-interface a more basic approach is more than eno
|
|
|
|
|
|
|
|
|
|
|
|
This section addresses various use cases and problems solvable with git.
|
|
|
|
This section addresses various use cases and problems solvable with git.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
There is also an interactive
|
|
|
|
|
|
|
|
[fixup guide by Seth Robertson](https://sethrobertson.github.io/GitFixUm/fixup.html).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
For Linux specific usage refer to the [corresponding entry](git)
|
|
|
|
|
|
|
|
|
|
|
|
### Ignore files having local changes
|
|
|
|
### Ignore files having local changes
|
|
|
|
|
|
|
|
|
|
|
|
If you need to make changes to a file that are local you can run
|
|
|
|
If you need to make changes to a file that are local you can run
|
|
|
@ -53,3 +55,34 @@ Following this the file won't show up as having changes from the upstream.
|
|
|
|
Note that files tagged with this command are checked out sparsly, so you need
|
|
|
|
Note that files tagged with this command are checked out sparsly, so you need
|
|
|
|
to watch out for changes yourself if there are any.
|
|
|
|
to watch out for changes yourself if there are any.
|
|
|
|
To revert this run `config update-index --no-skip-worktree <file>`.
|
|
|
|
To revert this run `config update-index --no-skip-worktree <file>`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
### Authentication via SSH
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Authentication by default is done via a username and a password.
|
|
|
|
|
|
|
|
For some services such as Github.
|
|
|
|
|
|
|
|
it is not possible to use password as an authentication method.
|
|
|
|
|
|
|
|
The other possibility to authenticate to git is by using
|
|
|
|
|
|
|
|
[SSH](/wiki/linux/ssh.md).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
For this a
|
|
|
|
|
|
|
|
[SSH certificate has to be created](/wiki/linux/ssh.md#generate-new-keys) and
|
|
|
|
|
|
|
|
[added to the authentication agent](/wiki/linux/ssh.md#adding-keys-to-authentication-agent).
|
|
|
|
|
|
|
|
Afterwards it the public SSH key to be added to the git server.
|
|
|
|
|
|
|
|
For Github there is
|
|
|
|
|
|
|
|
[a guide on that topic](https://docs.github.com/en/get-started/getting-started-with-git/why-is-git-always-asking-for-my-password).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Following these the git repositories have to be cloned in a special way to use
|
|
|
|
|
|
|
|
SSH instead of password and username.
|
|
|
|
|
|
|
|
The following shows both the normal way and the SSH way to clone git
|
|
|
|
|
|
|
|
repositories.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
```ssh
|
|
|
|
|
|
|
|
git clone ssh://git@github.com:tiyn/wiki
|
|
|
|
|
|
|
|
git clone https://github.com/tiyn/wiki
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
By using the SSH config file the clone command can be shortened to
|
|
|
|
|
|
|
|
`git clone github:tiyn/wiki`.
|
|
|
|
|
|
|
|
For this follow the
|
|
|
|
|
|
|
|
[corresponding section in the SSH entry](/wiki/linux/ssh.md#shorten-ssh-connection-commands).
|
|
|
|
|
|
|
|
Set `Host` to `github`, `HostName` to `github.com` and `User` to `git`.
|
|
|
|