2016-09-07 03:19:16 +00:00
|
|
|
---
|
|
|
|
title: "Common Commands"
|
|
|
|
permalink: /docs/common_commands
|
|
|
|
---
|
|
|
|
Most of these operations will look like Git commands; because they are.
|
2019-10-19 18:59:03 +00:00
|
|
|
yadm wraps Git, allowing it to perform all of Git's operations. The
|
2016-09-07 03:19:16 +00:00
|
|
|
difference is your `$HOME` directory becomes the working directory, and you can
|
|
|
|
run the commands from any directory.
|
|
|
|
|
2019-10-19 18:59:03 +00:00
|
|
|
Commands below which are special to yadm are denoted with
|
2016-09-07 03:19:16 +00: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 05:53:14 +00:00
|
|
|
<i class="fab fa-fw fa-git-square" aria-hidden="true"></i>.
|
2016-09-07 03:19:16 +00:00
|
|
|
|
|
|
|
<i class="fa fa-fw fa-asterisk" aria-hidden="true"></i> `man yadm`
|
2019-10-19 18:59:03 +00:00
|
|
|
: Display yadm's
|
2016-09-07 03:19:16 +00:00
|
|
|
[manual](https://github.com/TheLocehiliosan/yadm/blob/master/yadm.md).
|
|
|
|
|
2019-03-20 05:53:14 +00:00
|
|
|
<i class="fab fa-fw fa-git-square" aria-hidden="true"></i> `yadm status`
|
2016-09-07 03:19:16 +00:00
|
|
|
: Show the repository status; added, changed, removed files. Because a `$HOME`
|
|
|
|
directory often more than only dotfiles, by default
|
2019-10-19 18:59:03 +00:00
|
|
|
yadm ignores untracked files when displaying status.
|
2016-09-07 03:19:16 +00:00
|
|
|
|
2019-03-20 05:53:14 +00:00
|
|
|
<i class="fab fa-fw fa-git-square" aria-hidden="true"></i> `yadm push`, `yadm fetch`
|
2016-09-07 03:19:16 +00:00
|
|
|
: Send or retrive commits to/from your remote repository .
|
|
|
|
|
2019-03-20 05:53:14 +00:00
|
|
|
<i class="fab fa-fw fa-git-square" aria-hidden="true"></i> `yadm commit --amend`
|
2016-09-07 03:19:16 +00: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 05:53:14 +00:00
|
|
|
<i class="fab fa-fw fa-git-square" aria-hidden="true"></i> `yadm diff`
|
2016-09-07 03:19:16 +00:00
|
|
|
: View changes (uncommitted) you've made to your dotfiles.
|
|
|
|
|
2019-03-20 05:53:14 +00:00
|
|
|
<i class="fab fa-fw fa-git-square" aria-hidden="true"></i> `yadm diff --cached`
|
2016-09-07 03:19:16 +00: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 18:59:03 +00:00
|
|
|
: Print a list of files managed by yadm. The -a option will cause all managed
|
2016-09-07 03:19:16 +00: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 20:07:13 +00:00
|
|
|
: Encrypt all files matching the patterns found in `$HOME/.config/yadm/encrypt`. Read
|
2016-09-07 03:19:16 +00: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 20:07:13 +00:00
|
|
|
: Decrypt files stored in `$HOME/.config/yadm/files.gpg`. Using the `-l` option will
|
2016-09-07 03:19:16 +00:00
|
|
|
only list the files (without decrypting them). Read about
|
|
|
|
[encryption](encryption) for more details.
|
|
|
|
|
2017-02-05 22:39:31 +00: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 05:53:14 +00:00
|
|
|
<i class="fab fa-fw fa-git-square" aria-hidden="true"></i> `yadm remote -v`
|
2016-09-07 03:19:16 +00:00
|
|
|
: Display detailed information about all configured remote repositories.
|
|
|
|
|
2019-03-20 05:53:14 +00:00
|
|
|
<i class="fab fa-fw fa-git-square" aria-hidden="true"></i> `yadm checkout -- <file>`
|
2016-09-07 03:19:16 +00:00
|
|
|
: Abandon local changes to `<file>`, replacing it with the `HEAD` revision of
|
|
|
|
`<file>`.
|
|
|
|
|
2019-03-20 05:53:14 +00:00
|
|
|
<i class="fab fa-fw fa-git-square" aria-hidden="true"></i> `yadm checkout -b <branch-name>`
|
2016-09-07 03:19:16 +00:00
|
|
|
: Create a branch called `<branch-name>`, and check the branch out.
|