It's a simple implementation of Git in Scala. This project was realized in 2 and a half weeks as part of a functional programming project
$ cd
$ git clone https://github.com/MartinCayuelas/sgit.git
$ cd sgit
$ source install.sh
$ cd ..
$ mkdir yourOwnFolder
$ cd yourOwnFolderYou have to stay in the same terminal or redo the source install.sh if you change terminal.
If you can't launch later, you can add this to your PATH
export PATH="/Your/Path/sgit/target/scala-2.13/:$PATH"
alias sgit="sgit-assembly-0.1.jar"Now, you can enjoy Sgit
$ cd sgit
$ sbt testNow, you can test Sgit
Allows you to create a .sgit repository
sgit initThis commands shows the state of each file.(New or modified)
sgit statusThis command allows to see differences between files stage or not if they are modified
sgit diffThis command allows to add files or folder or files with regex expression. The deletion isn't handled
sgit add <filename/filenames or . or regexp or folder>This command is used to do a record of the stage and to have history of it. With a message or not
sgit commit
sgit commit -m <message>This command is used to list the version history for all the branches. -p and --stat offer more specific information
sgit log
sgit log -p
sgit log --statThis command is used to create a new branch linked to the last commit.
sgit branch <nameBranch>This command is used to display all the branches and tags created. Shows also the current branch
sgit branch -avThis command is used to switch from one branch to another or to a specific commit or to a specific tag. It's possible there are some bugs with folder not deleted
sgit checkout <nameBranch or nameTag or commitHash>This command is used to create a new tag linked to the last commit.
sgit tag <nameTag>-
sgit merge ❌
-
sgit rebase ❌
-
sgit rebase -i ❌