2016-09-06 23:19:16 -04:00
|
|
|
---
|
|
|
|
title: "Getting Started"
|
|
|
|
permalink: /docs/getting_started
|
|
|
|
---
|
2019-10-19 14:59:03 -04:00
|
|
|
Starting out with yadm should be just a few easy steps.
|
2016-09-06 23:19:16 -04:00
|
|
|
|
|
|
|
### If you don't currently have a repository
|
|
|
|
Start out with an empty local repository
|
|
|
|
|
|
|
|
yadm init
|
|
|
|
yadm add <important file>
|
|
|
|
yadm commit
|
|
|
|
|
|
|
|
Eventually you will want to push the local repo to a remote.
|
|
|
|
|
|
|
|
yadm remote add origin <url>
|
2022-03-12 15:53:17 -05:00
|
|
|
yadm push -u origin <local branch>:<remote branch>
|
|
|
|
|
|
|
|
<sub><sup>
|
|
|
|
The default branch used is dependent upon your version of Git, your remote
|
|
|
|
repository, and your configurations.
|
|
|
|
</sup></sub>
|
2016-09-06 23:19:16 -04:00
|
|
|
|
|
|
|
### If you have an existing remote repository
|
2019-10-19 14:59:03 -04:00
|
|
|
Clone your existing repo using yadm.
|
2016-09-06 23:19:16 -04:00
|
|
|
|
|
|
|
yadm clone <url>
|
|
|
|
yadm status
|
|
|
|
|
2021-02-08 16:49:32 -05:00
|
|
|
The `clone` command will attempt to check out all files that exist in the
|
|
|
|
repository. If a file already exists locally and has content that differs from
|
|
|
|
the one in the repository, the local file will be left unmodified and you'll
|
|
|
|
have to review and resolve the differences.
|
2016-09-06 23:19:16 -04:00
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
That's all it takes to start. Now most Git commands can be used as
|
|
|
|
`yadm <git command>`.
|
|
|
|
Read about [common commands](common_commands) for ideas.
|