Sign inSign up

washingtone/source-control-tool

By washingtone

Updated almost 2 years ago

sc: A lightweight distributed source control system for efficient code management and collaboration.

Image
Languages & frameworks
0

100

washingtone/source-control-tool repository overview

Source Control Tool (sc)

sc is a distributed source control system designed for developers to manage their code repositories efficiently. This lightweight tool offers intuitive commands for version control and collaboration.

Features
  • Initialize repositories
  • Create, switch, and manage branches
  • Add files to staging and commit changes
  • Merge branches
  • View commit history and repository status
  • Clone repositories

Usage

Run the following command to see all available options:

sc --help
Commands
init

Initialize a new repository. By default, the main branch is named main.

sc init
branch [branch]

List all branches or create a new branch.

  • To list all branches:
    sc branch
    
  • To create a new branch:
    sc branch <branch-name>
    
switchto <branch>

Switch to a specific branch.

sc switchto <branch-name>
merge <branch>

Merge a branch into the current branch.

sc merge <branch-name>
status

Show the working tree status.

sc status
add <file>

Add a file to the staging area.

sc add <file-name>
commit [options]

Record changes to the repository.

  • To commit all staged changes:
    sc commit -m "Your commit message"
    
log [options]

View the commit history.

sc log
clone [options] <repository>

Clone a repository.

sc clone <repository-url>
help [command]

Display help for a specific command.

sc help <command>

Example Workflow

  1. Initialize a repository:

    sc init
    
  2. Create and switch to a new branch:

    sc branch feature-xyz
    sc switchto feature-xyz
    
  3. Add files to the staging area:

    sc add index.js
    
  4. Commit changes:

    sc commit -m "Added index.js"
    
  5. Merge the feature branch into the main branch:

    sc switchto main
    sc merge feature-xyz
    
  6. View the commit history:

    sc log
    

Author

Washingtone Jalang'O Otiene

Tag summary

Content type

Image

Digest

sha256:8e7ea2994

Size

333.6 MB

Last updated

almost 2 years ago

docker pull washingtone/source-control-tool:tagname