My first Git repository—nothing fancy, just a record of my initial attempts at using Git. Expect a mix of commits and exploration as I navigate through version control for the first time.
- Git installed on your system.
Ensure Git is installed on your machine before proceeding.
- Download and install Git from the official website.
- Follow the installation instructions based on your operating system.
- No additional modifications are needed; you're ready to use Git!
To run Git, follow these steps:
- Open your terminal or command prompt.
- Navigate to the directory where you want to use Git.
- Initialize a new Git repository or clone an existing one:
or
git init
git clone <repository_url>
- Start making commits to track changes:
git add . git commit -m "Your commit message here"
- Push changes to a remote repository:
git push origin main
Now you're set to use Git for version control... this is a very simple guide when i first start using Git.
If you encounter common problems or issues while using Git, here are three tips to help you:
-
Issue: Forgetting to configure your identity.
git config --global user.email "your@email.com" git config --global user.name "Your Name"
-
Issue: Making changes without creating a branch.
git branch feature_branch # Create a new branch git checkout feature_branch # Switch to the new branch
Remember to check the official Git documentation for more detailed assistance.
Author:
You can reach out to me for suggestions, comments, or just to chat:
- Adrian Salitico
Inspiration, code snippets, etc.