2016-09-06 23:19:16 -04:00
|
|
|
---
|
|
|
|
title: "Common Commands"
|
|
|
|
permalink: /docs/common_commands
|
|
|
|
---
|
|
|
|
Most of these operations will look like Git commands; because they are.
|
2019-10-19 14:59:03 -04:00
|
|
|
yadm wraps Git, allowing it to perform all of Git's operations. The
|
2016-09-06 23:19:16 -04:00
|
|
|
difference is your `$HOME` directory becomes the working directory, and you can
|
|
|
|
run the commands from any directory.
|
|
|
|
|
2019-10-19 14:59:03 -04:00
|
|
|
Commands below which are special to yadm are denoted with
|
2016-09-06 23:19:16 -04:00
|
|
|
<i class="fa fa-fw fa-asterisk" aria-hidden="true"></i>,
|
|
|
|
and those which are passed directly through to Git are denoted with
|
2019-03-20 01:53:14 -04:00
|
|
|
<i class="fab fa-fw fa-git-square" aria-hidden="true"></i>.
|
2016-09-06 23:19:16 -04:00
|
|
|
|
|
|
|
<i class="fa fa-fw fa-asterisk" aria-hidden="true"></i> `man yadm`
|
2019-10-19 14:59:03 -04:00
|
|
|
: Display yadm's
|
2016-09-06 23:19:16 -04:00
|
|
|
[manual](https://github.com/TheLocehiliosan/yadm/blob/master/yadm.md).
|
|
|
|
|
2019-03-20 01:53:14 -04:00
|
|
|
<i class="fab fa-fw fa-git-square" aria-hidden="true"></i> `yadm status`
|
2016-09-06 23:19:16 -04:00
|
|
|
: Show the repository status; added, changed, removed files. Because a `$HOME`
|
|
|
|
directory often more than only dotfiles, by default
|
2019-10-19 14:59:03 -04:00
|
|
|
yadm ignores untracked files when displaying status.
|
2016-09-06 23:19:16 -04:00
|
|
|
|
2019-03-20 01:53:14 -04:00
|
|
|
<i class="fab fa-fw fa-git-square" aria-hidden="true"></i> `yadm push`, `yadm fetch`
|
2016-09-06 23:19:16 -04:00
|
|
|
: Send or retrive commits to/from your remote repository .
|
|
|
|
|
2019-03-20 01:53:14 -04:00
|
|
|
<i class="fab fa-fw fa-git-square" aria-hidden="true"></i> `yadm commit --amend`
|
2016-09-06 23:19:16 -04:00
|
|
|
: Replace the last commit with a new one. Allows you to change your commit
|
|
|
|
message or add staged changes to the previous commit.
|
|
|
|
|
2019-03-20 01:53:14 -04:00
|
|
|
<i class="fab fa-fw fa-git-square" aria-hidden="true"></i> `yadm diff`
|
2016-09-06 23:19:16 -04:00
|
|
|
: View changes (uncommitted) you've made to your dotfiles.
|
|
|
|
|
2019-03-20 01:53:14 -04:00
|
|
|
<i class="fab fa-fw fa-git-square" aria-hidden="true"></i> `yadm diff --cached`
|
2016-09-06 23:19:16 -04:00
|
|
|
: View changes staged with `yadm add`. These changes will be added with the next
|
|
|
|
commit.
|
|
|
|
|
|
|
|
<i class="fa fa-fw fa-asterisk" aria-hidden="true"></i> `yadm list -a`
|
2019-10-19 14:59:03 -04:00
|
|
|
: Print a list of files managed by yadm. The -a option will cause all managed
|
2016-09-06 23:19:16 -04:00
|
|
|
files to be listed. Otherwise, the list will only include files from the
|
|
|
|
current directory or below.
|
|
|
|
|
|
|
|
<i class="fa fa-fw fa-asterisk" aria-hidden="true"></i> `yadm alt`
|
|
|
|
: Create symbolic links for any managed files matching the alternate naming rules.
|
|
|
|
Read about [alternate files](alternates) for more details.
|
|
|
|
|
|
|
|
<i class="fa fa-fw fa-asterisk" aria-hidden="true"></i> `yadm encrypt`
|
2019-10-20 16:07:13 -04:00
|
|
|
: Encrypt all files matching the patterns found in `$HOME/.config/yadm/encrypt`. Read
|
2016-09-06 23:19:16 -04:00
|
|
|
about [encryption](encryption) for more details.
|
|
|
|
|
|
|
|
<i class="fa fa-fw fa-asterisk" aria-hidden="true"></i> `yadm decrypt`, `yadm decrypt -l`
|
2019-10-20 16:07:13 -04:00
|
|
|
: Decrypt files stored in `$HOME/.config/yadm/files.gpg`. Using the `-l` option will
|
2016-09-06 23:19:16 -04:00
|
|
|
only list the files (without decrypting them). Read about
|
|
|
|
[encryption](encryption) for more details.
|
|
|
|
|
2017-02-05 17:39:31 -05:00
|
|
|
<i class="fa fa-fw fa-asterisk" aria-hidden="true"></i> `yadm clone --bootstrap <URL>`
|
|
|
|
: Clone the repository from `<URL>`, and automatically run bootstrap if
|
|
|
|
successful. Read about [bootstrap](bootstrap) for more details.
|
|
|
|
|
2019-03-20 01:53:14 -04:00
|
|
|
<i class="fab fa-fw fa-git-square" aria-hidden="true"></i> `yadm remote -v`
|
2016-09-06 23:19:16 -04:00
|
|
|
: Display detailed information about all configured remote repositories.
|
|
|
|
|
2019-03-20 01:53:14 -04:00
|
|
|
<i class="fab fa-fw fa-git-square" aria-hidden="true"></i> `yadm checkout -- <file>`
|
2016-09-06 23:19:16 -04:00
|
|
|
: Abandon local changes to `<file>`, replacing it with the `HEAD` revision of
|
|
|
|
`<file>`.
|
|
|
|
|
2019-03-20 01:53:14 -04:00
|
|
|
<i class="fab fa-fw fa-git-square" aria-hidden="true"></i> `yadm checkout -b <branch-name>`
|
2016-09-06 23:19:16 -04:00
|
|
|
: Create a branch called `<branch-name>`, and check the branch out.
|