Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save cpoDesign/ff97d44f102a2caf7aa525604279aed3 to your computer and use it in GitHub Desktop.
Save cpoDesign/ff97d44f102a2caf7aa525604279aed3 to your computer and use it in GitHub Desktop.
GitHub Basic Commands
# GitHub Basic Commands
GitHub is an essential tool for version control and collaboration. In this article, we will cover some basic commands to get you started with GitHub. These include configuring your username and user email, getting data from a repository, and committing changes.
## Configuring Username and User Email
Before you start using Git, you need to configure your username and user email. This information will be associated with your commits.
```bash
# Set your username
git config --global user.name "Your Name"
# Set your email
git config --global user.email "[email protected]"
# Clone a repository
git clone https://github.com/username/repository.git
# Check the status of your repository
git status
# Add a specific file to the staging area
git add filename
# Add all changes to the staging area
git add .
# Commit your changes with a message
git commit -m "Your commit message"
# Push your changes to the remote repository
git push origin main
# Pull changes from the remote repository
git pull origin main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment