Skip to content

Instantly share code, notes, and snippets.

@mathisto
Created December 12, 2024 17:26
Show Gist options
  • Save mathisto/002f6da4b34d44fb37fd40e7d5e7736e to your computer and use it in GitHub Desktop.
Save mathisto/002f6da4b34d44fb37fd40e7d5e7736e to your computer and use it in GitHub Desktop.

High-Level Instructions

1.	Create a new branch for your work.
2.	Switch to the new branch.
3.	Make changes and commit them.
4.	Check your work (status and log).
5.	Push the branch to the remote repository.

Git Bash Commands

  1. Create and switch to a new branch: git checkout -b your-branch-name Replace your-branch-name with a descriptive name for the branch.

  2. Check your branch (optional): git branch Confirms you’re on the correct branch.

  3. Check your current status (to see unstaged changes): git status

  4. Stage and commit your changes:

git add .   # Stages all changes in the current directory
git commit -m "Your commit message"
  • Replace "Your commit message" with a concise description of what you changed.
  1. Check your commit history: git log --oneline Shows a condensed history of your commits.

  2. Push your branch to the remote repository: git push origin your-branch-name

  3. Verify the push was successful (optional): Check your branch in the remote repository or confirm with teammates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment