logo

shit

Unnamed repository; edit this file 'description' to name the repository. git clone https://hacktivis.me/git/mirror/shit.git

README.md (1411B)


  1. # shit
  2. shit == Shell Git
  3. This is an implementation of Git using (almost) entirely POSIX shell.
  4. Caveats:
  5. - There are a couple of GNU coreutilsisms, which are marked with "XXX: GNUism"
  6. throughout. They have been tested on BusyBox as well.
  7. - A native zlib implementation is required: [zlib](https://github.com/kevin-cantwell/zlib)
  8. - Why the fuck would you use this
  9. ## Status
  10. Enough plumbing commands are written to make this write the initial commit with
  11. itself, which is how the initial commit was written. Huzzah.
  12. ## How to use
  13. 1. Don't
  14. Okay, fine. Because only plumbing commands are implemented, you have to live
  15. with a garbage manual process. Do something like this:
  16. ```
  17. git clone https://git.sr.ht/~sircmpwn/shit
  18. mkdir my-project
  19. cd my-project
  20. ../shit/init
  21. # Write some code
  22. ```
  23. So we'll assume shit is at `../shit`.
  24. To create a new index from all of your files (note, subdirectories aren't
  25. working yet):
  26. ```
  27. ../shit/update-index *
  28. ```
  29. Then to create a tree object from these:
  30. ```
  31. ../shit/write-tree | ./hash-object -t tree -w
  32. ```
  33. This will print the tree ID to stdout. Use that to make a commit:
  34. ```
  35. export GIT_AUTHOR_NAME="Your Name"
  36. export GIT_AUTHOR_EMAIL="you@example.org"
  37. ../shit/commit-tree <tree sha> | ./hash-object -t commit -w
  38. ```
  39. This will print out the new commit's SHA. To update master to point to this new
  40. commit:
  41. ```
  42. echo <commit sha> > .git/refs/heads/master
  43. ```
  44. Tada.