GitHub 使用指南
279 字小于 1 分钟
2026-05-20
Github commit
Step 1: Check Git User Name and Email
Open your terminal and enter the following commands to check your Git configuration:
git config --global user.name
git config --global user.emailStep 2: Set Up Git User Name and Email (if not set)
If the user name and email are not set, you can set them using the following commands:
git config --global user.name "Your Name"
git config --global user.email "[email protected]"Step 3: Initialize Git Repository
Navigate to your project directory and initialize the repository if it is not already initialized:
cd /path/to/your/project
git initStep 4: Add Remote Repository
Add the remote repository URL:
git remote add origin https://github.com/kaizkq/AU-job-scraping-tool.gitStep 5: Add Files to the Repository
Add all files in your project directory to the staging area:
git add .Step 6: Commit Changes
Commit the changes with an initial commit message:
git commit -m "Initial commit"Step 7: Push Changes to GitHub
Finally, push the changes to the remote repository:
git branch -M mainIf your default branch is main instead of master, use main in the push command:
git push -u origin mainbranch name
Step 1: Check Current Branch Name
Run the following command to check the name of your current branch:
git branchStep 2: Rename the Branch to main (if necessary)
If your current branch is named master, you can rename it to main using:
git branch -m master mainStep 3: Push to the Remote Repository
Now, push your changes to the main branch on the remote repository:
git push -u origin main