Appearance
Git & GitHub
Sign up for a GitHub account
Getting a GitHub account is free and easy. Follow the "Sign up" link on the GitHub homepage.
Create a new GitHub repository
- Go to GitHub and create a new repository. You can do this by clicking the "+" icon in the top right corner and selecting "New repository".
- Name your repository (e.g.,
my-new-project), add a description, and choose whether to make it public or private. - Initialize the repository with a README file and choose a license if desired.
- Click "Create repository".
- Copy the URL of your new repository (e.g.,
https://github.com/username/my-new-project.git).
Clone the repository
On your local machine, open a terminal and run the following commands to clone the repository:
sh
git clone https://github.com/username/my-new-project.git
cd my-new-projectStage files for commit
After making changes to one or more files, you must stage them for commit.
sh
git add <file1> <file2> ...Commit changes
Once your changes are staged, you can commit them with a descriptive message:
sh
git commit -m "Your descriptive commit message"Push changes to GitHub
To upload your committed changes to the remote repository on GitHub, use the following command:
sh
git push