Welcome to GitX! This guide will help you get started with GitX and set up your first repository.
Installation Guide
Prerequisites:
Go (version 1.22.1 or higher)
Steps
- Clone the repository:
git clone https://github.com/TanviPooranmal/GitX cd GitX - Install dependencies:
go mod tidy - Build the project:
go build -o gitx cmd/main.go - Verify the installation:
./gitx --version
Configuration Guide
Configuration File
-
Create a configuration file: Create a
config.yamlfile in the project root.server: port: 8080 database: host: localhost port: 5432 user: gitxuser password: gitxpassword dbname: gitx_db -
Update the configuration file: Edit the
config.yamlfile with your specific settings.
Environment Variables
-
Set environment variables (optional):
export GITX_SERVER_PORT=8080 export GITX_DB_HOST=localhost export GITX_DB_PORT=5432 export GITX_DB_USER=gitxuser export GITX_DB_PASSWORD=gitxpassword export GITX_DB_NAME=gitx_db
Quick Start Guide
Running GitX
-
Start the server:
./gitx --config config.yaml -
Access the application: Open your browser and navigate to
http://localhost:8080.
Using GitX
-
Initialize a new repository:
./gitx init my-repo -
Add files to the repository:
./gitx add file1.txt file2.txt -
Commit changes:
./gitx commit -m "Initial commit" -
View the repository status:
./gitx status