Loading, please wait...

NavoCloud | Guide - Version Control Basics in Pterodactyl

Version Control Basics in Pterodactyl

This guide introduces the basics of version control in Pterodactyl, allowing you to manage, track, and save changes to your files and code over time. Let's explore how to use version control for better project management!

Step 1: Access Pterodactyl Panel

Start by logging into your Pterodactyl panel at panel.helhosting.com, where your server is hosted. Navigate to your server and ensure you have access to the files section.

Step 2: Install Git

Version control often requires Git, a popular version control system. If Git is not installed, access your server terminal and install Git by running:

sudo apt install git

Step 3: Initialize a Git Repository

To begin tracking changes, navigate to the directory you wish to track and initialize a Git repository:

git init
This creates a new Git repository in the current directory.

Step 4: Track and Commit Changes

After modifying files, add them to the staging area with:

git add .
Then, commit your changes with a message:
git commit -m "Your commit message"
This saves the current state of the files.

Step 5: Push to a Remote Repository (Optional)

If you have a remote repository, link it by adding the remote URL:

git remote add origin https://your-repo-url.git
Then, push your changes to the remote repository:
git push -u origin main
This creates a backup of your code online.

Step 6: Pull Changes from the Repository

To update your local files with any changes from the remote repository, use:

git pull origin main
This keeps your files up to date with the latest modifications from collaborators.

You have now learned the basics of version control in Pterodactyl using Git! Regularly commit your changes and push to a remote repository to keep your files safe and organized.