🏠 Homepage 🏠 Syllabus of Day 2 ⬅️ Previous: 📝 Making Changes & Committing
Pushing is the process of uploading your local branch commits to a remote repository on GitHub. This makes your changes available to others and allows you to open pull requests.
git push origin my-feature-branch
Replace my-feature-branch
with the name of your branch.
git push --all origin
git add .
git commit -m "Describe your changes"
git push origin my-feature-branch
To see which branches exist on the remote:
git branch -r
Action | Command Example |
---|---|
Push branch | git push origin my-feature-branch |
Push all branches | git push --all origin |
List remote branches | git branch -r |
Tip:
Always push your branch before opening a pull request so your changes are available on
➡️Up Next: 🔄 Cloning a Repository