Repository navigation
Git Setup and Workflow
Git is a version control system that tracks changes in your code and lets you collaborate with others.
Choose your operating system below to install Git:
-
Windows: Download and install Git for Windows (which includes Git Bash), or run
winget install --id Git.Git -e --source wingetin PowerShell. -
macOS: Install via Terminal using Xcode tools (
xcode-select --install), Homebrew (brew install git), or download from git-scm. -
Linux:
- Debian/Ubuntu:
sudo apt update && sudo apt install git - Fedora:
sudo dnf install git - Arch Linux:
sudo pacman -S git
- Debian/Ubuntu:
Open your terminal (or Git Bash on Windows) and configure your identity. Use the same email registered with your GitHub account:
git config --global user.name "Your Name"
git config --global user.email "your_email@example.com"
git config --global init.defaultBranch mainYou can interact with Git through the terminal or visual applications:
- Command Line (CLI): Fast, works on every system, and helps you understand how Git operates under the hood.
-
GUI Tools: Great for visualizing file differences, commits, and branch history. Popular options include:
- GitHub Desktop (Beginner-friendly)
- GitKraken (Visual branch graphing)
- Built-in Git panels in VS Code (Source Control tab:
Ctrl+Shift+G) and WebStorm (Alt+9/Cmd+9).
Recommendation: Start with the built-in Git tools in VS Code/WebStorm or GitHub Desktop if you prefer a visual interface, but get familiar with standard CLI commands.
Copy the repository URL from GitHub and clone it to your local computer:
git clone https://github.com/UTDNebula/engineeringSandbox.git
cd engineeringSandbox(In GUI tools, select File > Clone Repository and paste the URL).
Never make changes directly on the main branch. Create a dedicated branch for your work:
git checkout -b feature/your-feature-nameCommon naming conventions:
feature/short-description,fix/issue-description, ordocs/update-guide.
Make your edits in your editor, then stage and commit them:
# Stage modified files
git add .
# Commit with a clear message
git commit -m "feat: add responsive navigation menu"Writing Good Commit Messages: We follow Conventional Commits:
feat:A new featurefix:A bug fixdocs:Documentation only changesstyle:Formatting/styling without logic changesrefactor:Code restructuring without changing behaviorchore:Tooling, dependency updates, maintenance
Push your branch to GitHub:
git push -u origin feature/your-feature-nameA merge conflict occurs when changes made on main conflict with changes in your branch on the same lines of code.
Before opening a PR or finishing your work, sync your branch with the latest changes from main:
git checkout main
git pull origin main
git checkout feature/your-feature-name
git merge mainIf Git reports a conflict:
- Open your project in VS Code or WebStorm.
- The editor will highlight conflicting lines and provide buttons to "Accept Current Change", "Accept Incoming Change", or "Accept Both Changes".
- Choose the correct code, save the file, and finish the merge:
git add . git commit -m "chore: resolve merge conflicts with main" git push
For more details, see GitHub's guide on Resolving merge conflicts.
Instead, suggest a change by
creating an issue,
or
opening a pull request
with your change. See How To Contribute for more
details. These docs are automatically generated from
the docs/folder of this repository.