Skip to content
/ sstc Public

My own implementation for source code management system

Notifications You must be signed in to change notification settings

ahmedakef/sstc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 

Repository files navigation

sstc (Stop Talk Start Code)

My own implementation for source code management system (SCM)

Quick Overview

the main feature of the system is to record every change when you commit and let you checkout to this commit at any time

Main features

  1. add to add files to staging area
  2. commit to commit changes
  3. log to list commits history
  4. checkout to change source code to this commit
  5. help to list manual

initialize a repo

To initialize a repo:

init

It will create a directory called .sstc inside the current folder.
Inside that directory, it will generate the initial repo structure :

.sstc
├── current.txt
├── master
    └── 0.txt
    └── commits_log.txt
    └── depend_on.txt
    └── tracked.txt

Add files to staging area

to add files to staging area:

add <file path> ...

commit changes

compute delta from origional file and current file and store change in the commit file:

commit <message>

I have used flowe approach -mentioned in resources-.

log commits

to list commits history:

log

checkout

to change source code to this commit:

checkout <commit_num>

it reads the delta from commit then combine it with origional file then write the result in the current file

show manual

to list manual:

help

Future work

  1. status to list changes and new files from the last commit
  2. branch support branches and merge them
  3. use Zlib library to compress changes
  4. use VCDIFF to compute delta and compress it
  5. use any DBMS to store information about commits and branches

Resources

take your time in learning the theory and the best design you need ,this resources help me alot The Eric Sink's Weblog is A good place to learn about version control , specially:

Two answers on stackoverflow :

Contributing

You can contribute by reviewing and sending feedback on code , suggesting a new features ,implement Future work described above, as well as submit code fixes or code contributions of your own.

About

My own implementation for source code management system

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages