Fossil SCM
Added the "Init In Place" section to the gitusers doc.
Commit
b564baa67f7e50090dcff22a9eb14f0c6c332e16da0d4923af343f1c9994f4ce
Parent
4fa02aff8e6c9d2…
1 file changed
+40
+40
| --- www/gitusers.md | ||
| +++ www/gitusers.md | ||
| @@ -177,10 +177,50 @@ | ||
| 177 | 177 | In native Windows builds of Fossil — that is, excluding Cygwin and WSL |
| 178 | 178 | builds, which follow POSIX conventions — this file is called `_FOSSIL_` |
| 179 | 179 | instead to get around the historical 3-character extension limit with |
| 180 | 180 | certain legacy filesystems. |
| 181 | 181 | |
| 182 | + | |
| 183 | +#### <a id="iip"></a> Init In Place | |
| 184 | + | |
| 185 | +To illustrate these differences, consider this common Git “init in place” | |
| 186 | +method for creating a new repository from an existing tree of files, | |
| 187 | +perhaps because you are placing that project under version control for | |
| 188 | +the first time: | |
| 189 | + | |
| 190 | + cd long-established-project | |
| 191 | + git init | |
| 192 | + git add * | |
| 193 | + git commit -m "Initial commit of project." | |
| 194 | + | |
| 195 | +The closest equivalent in Fossil is: | |
| 196 | + | |
| 197 | + cd long-established-project | |
| 198 | + fossil init .fsl | |
| 199 | + fossil open --force .fsl | |
| 200 | + fossil add * | |
| 201 | + fossil ci -m "Initial commit of project." | |
| 202 | + | |
| 203 | +Note that unlike in Git, you can abbreviate the “`commit`” command in | |
| 204 | +Fossil as “`ci`” for compatibility with CVS, Subversion, etc. | |
| 205 | + | |
| 206 | +This creates a `.fsl` repo DB at the root of the project check-out to | |
| 207 | +emulate the `.git` repo dir. We have to use the `--force` flag on | |
| 208 | +opening the new repo because Fossil expects you to open a repo into an | |
| 209 | +empty directory in order to avoid spamming the contents of a repo over | |
| 210 | +an existing directory full of files. Here, we know the directory | |
| 211 | +contains files that will soon belong in the repository, though, so we | |
| 212 | +override this check. From then on, Fossil works like Git, for the | |
| 213 | +purposes of this example. | |
| 214 | + | |
| 215 | +We’ve drawn this example to create a tight parallel between Fossil and | |
| 216 | +Git, not to commend this `.fsl`-at-project-root trick to you. A better | |
| 217 | +choice would be `~/museum/home/long-established-project.fossil`, if | |
| 218 | +you’re following the directory scheme exemplified above. That said, it | |
| 219 | +does emphasize an earlier point: Fossil doesn’t care where you put the | |
| 220 | +repo DB file or what you name it. | |
| 221 | + | |
| 182 | 222 | [clone]: /help?cmd=clone |
| 183 | 223 | [close]: /help?cmd=close |
| 184 | 224 | [gloss]: ./whyusefossil.wiki#definitions |
| 185 | 225 | [hb]: https://en.wikipedia.org/wiki/Heisenbug |
| 186 | 226 | [open]: /help?cmd=open |
| 187 | 227 |
| --- www/gitusers.md | |
| +++ www/gitusers.md | |
| @@ -177,10 +177,50 @@ | |
| 177 | In native Windows builds of Fossil — that is, excluding Cygwin and WSL |
| 178 | builds, which follow POSIX conventions — this file is called `_FOSSIL_` |
| 179 | instead to get around the historical 3-character extension limit with |
| 180 | certain legacy filesystems. |
| 181 | |
| 182 | [clone]: /help?cmd=clone |
| 183 | [close]: /help?cmd=close |
| 184 | [gloss]: ./whyusefossil.wiki#definitions |
| 185 | [hb]: https://en.wikipedia.org/wiki/Heisenbug |
| 186 | [open]: /help?cmd=open |
| 187 |
| --- www/gitusers.md | |
| +++ www/gitusers.md | |
| @@ -177,10 +177,50 @@ | |
| 177 | In native Windows builds of Fossil — that is, excluding Cygwin and WSL |
| 178 | builds, which follow POSIX conventions — this file is called `_FOSSIL_` |
| 179 | instead to get around the historical 3-character extension limit with |
| 180 | certain legacy filesystems. |
| 181 | |
| 182 | |
| 183 | #### <a id="iip"></a> Init In Place |
| 184 | |
| 185 | To illustrate these differences, consider this common Git “init in place” |
| 186 | method for creating a new repository from an existing tree of files, |
| 187 | perhaps because you are placing that project under version control for |
| 188 | the first time: |
| 189 | |
| 190 | cd long-established-project |
| 191 | git init |
| 192 | git add * |
| 193 | git commit -m "Initial commit of project." |
| 194 | |
| 195 | The closest equivalent in Fossil is: |
| 196 | |
| 197 | cd long-established-project |
| 198 | fossil init .fsl |
| 199 | fossil open --force .fsl |
| 200 | fossil add * |
| 201 | fossil ci -m "Initial commit of project." |
| 202 | |
| 203 | Note that unlike in Git, you can abbreviate the “`commit`” command in |
| 204 | Fossil as “`ci`” for compatibility with CVS, Subversion, etc. |
| 205 | |
| 206 | This creates a `.fsl` repo DB at the root of the project check-out to |
| 207 | emulate the `.git` repo dir. We have to use the `--force` flag on |
| 208 | opening the new repo because Fossil expects you to open a repo into an |
| 209 | empty directory in order to avoid spamming the contents of a repo over |
| 210 | an existing directory full of files. Here, we know the directory |
| 211 | contains files that will soon belong in the repository, though, so we |
| 212 | override this check. From then on, Fossil works like Git, for the |
| 213 | purposes of this example. |
| 214 | |
| 215 | We’ve drawn this example to create a tight parallel between Fossil and |
| 216 | Git, not to commend this `.fsl`-at-project-root trick to you. A better |
| 217 | choice would be `~/museum/home/long-established-project.fossil`, if |
| 218 | you’re following the directory scheme exemplified above. That said, it |
| 219 | does emphasize an earlier point: Fossil doesn’t care where you put the |
| 220 | repo DB file or what you name it. |
| 221 | |
| 222 | [clone]: /help?cmd=clone |
| 223 | [close]: /help?cmd=close |
| 224 | [gloss]: ./whyusefossil.wiki#definitions |
| 225 | [hb]: https://en.wikipedia.org/wiki/Heisenbug |
| 226 | [open]: /help?cmd=open |
| 227 |