Skip to content

Nitram-27C/sgit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

101 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sgit

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

Installation

$ cd
$ git clone https://github.com/MartinCayuelas/sgit.git
$ cd sgit
$ source install.sh
$ cd ..
$ mkdir yourOwnFolder
$ cd yourOwnFolder

You 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

Tests

$ cd sgit
$ sbt test

Now, you can test Sgit

Features

Create:

Allows you to create a .sgit repository

sgit init

Local Changes:

This commands shows the state of each file.(New or modified)

sgit status

This command allows to see differences between files stage or not if they are modified

sgit diff

This 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>

Commit History:

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 --stat

Branches and Tags

This 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 -av

This 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>

Merge & Rebase

  • sgit merge ❌

  • sgit rebase ❌

  • sgit rebase -i ❌

About

Simple implementation of Git in scala

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published