Open
Description
git
commands
Command | Description |
---|---|
git status |
Lists which branch you are working from and lists which files are staged, unstaged, and untracked. |
git branch |
List of all local branches |
git branch -r |
List of all remote branches |
git branch -a |
List of all branches (local and remote) |
git checkout name_of_branch |
Swiches/ check out banch named name_of_branch branch |
git checkout -b new_branch |
Create and check out a new branch named new_branch |
git push -u origin |
pushes the new local branch and and all commits within that branch |
git add . |
stage all files |
git commit -m write_a_message_here |
commit all staged files with commit message. |
reset --hard origin/main |
remove all the commits ahead of the remote main branch |
git push -u origin branch-name |
pushing a new branch with all the commits in the branch |
git log --graph --all |
graphic representation of what is going on with your branches and commits |
git push --delete origin branch_name |
delete a branch locally and remote |
Metadata
Metadata
Assignees
Labels
No labels