This is my attempt at creating a version control similar to git and is still currently in development, created from scratch in C++. Features functionalities like status, commit, push and log.
NOTE: This will work only on Linux and Unix systems and does not support Windows for now. This uses the C++17 standard.
Clone the repository
https://github.com/shadyskies/vcs_from_scratch.git
Sqlite3, g++-9 should be installed.
Build the main file.
g++ -std=c++17 client.cpp file.cpp -lsqlite3 -o file.out
And on the remote server.
g++ -std=c++17 server.cpp -o server.out
Change the host IP in server.cpp to match server IP.
Run commands as you normally would with git.
./file.out < status / commit <message> / push(requires server to be running) / log >
Run the server(Tested on docker container)
./server.out
figure out databasefigure out files diffdiff code for remote vs localtest in dockergarbage values in end of file (check bytes written)diff bw server and clientlisten for incoming connections after one client closes- add commit hash
- where does HEAD for local point wrt remote?
- multiple clients? (data inconsistency)
- package code
- Branching
- Revert Commit
- Cherry Pick
- Merge