Bit is a simple version control system implemented in C++ as a personal project to understand the principles of version control systems like Git.
- Commit: Create commits with a commit message.
- Staging: Stage changes before committing.
- Checkout: Switch between different commits.
- Branch: Branches will be added later.
To get started with Bit, follow these steps:
-
Clone the Repository:
git clone https://github.com/simple40/bit.git cd bit
-
Build the project
-
Open Visual Studio:
- Choose "Open a project or solution."
- Navigate to the Bit project directory and open the solution file (Bit.sln).
-
Configure Build:
- Select the build configuration (e.g., Debug or Release) from the toolbar.
- Right-click on the project in the Solution Explorer and select "Properties."
- Verify and configure project settings if needed.
- Build the Project:
-
Build the project:
- by selecting "Build" > "Build Solution" from the menu.
- Alternatively, you can use the shortcut Ctrl + Shift + B.
This will compile the source code and generate the bit.exe executable.
- Verify Build:
- Open the Developer Command Prompt for Visual Studio.
- Navigate to the Bit project directory.
- Run the following command to verify the build:
.x64\Debug\bit --version or .x64\Release\bit --version
This should display the version information, confirming that the build was successful.
-
- Add Changes to Staging Area
bit add <file1> <file2> ... # Add specific files
bit add . # Add all changes
- Commit Changes
bit commit "Your commit message here"
- Check Repository Status
bit status
- View Commit History
bit log
- Checkout to Previous Commit
bit checkout <commit_sha_hash>
- List Files in Index
bit ls
Example Usage Here's an example workflow:
# Add changes
bit add file1.txt file2.txt
# Commit changes
bit commit "Added new features"
# Check repository status
bit status
# View commit history
bit log
Now you're ready to start using Bit for your version control needs!
- Licensed under MIT License