Instructions for Using Git for the First Time
1. Set up Git:
git config --global user.name "Your Name"
git config --global user.email "your_email@example.com"
2. Create a new project folder:
mkdir my_project
cd my_project
3. Initialize a Git repository:
git init
4. Add files to the project and check status:
git add .
git status
5. Commit changes:
git commit -m "Initial commit"
6. Create a repository on GitHub and copy the repository URL.
7. Link the local repository to GitHub:
git remote add origin https://github.com/username/repository_name.git
8. Push changes to GitHub:
git branch -M main
git push -u origin main
9. For subsequent changes:
git add .
git commit -m "Your commit message"
git push
10. To clone an existing repository:
git clone https://github.com/username/repository_name.git