Skip to content

Latest commit

 

History

History
107 lines (67 loc) · 1.46 KB

File metadata and controls

107 lines (67 loc) · 1.46 KB

Git commands

education.github.com

Git Clone

git clone [url]

Creates a copy of a remote repository on your local machine.

Git Add

git add .

Stages all changes in the current directory for the next commit.

Git Commit

git commit -m "Initialize project"

Records the staged changes with a descriptive message.

Git Push

git push

Uploads local repository content to a remote repository.

Git Remote

git remote add [url]

Connects your local repository to a remote server.

Git Log

git log

Shows the commit history for the current branch.

Git Status

git status

Displays the state of the working directory and staging area.

Git Checkout

git checkout [branch-name]

Switches to a specified branch and updates the working directory.

Git Merge

git merge [branch-name]

Combines the specified branch's history into the current branch.

Git Rebase

git rebase [branch-name]

Reapplies commits on top of another base tip, often used to maintain a linear project history.

Git Pull

git pull

Fetches from and integrates with another repository or local branch.

Git Fetch

git fetch

Downloads objects and refs from another repository without merging.

Git Branch

git branch

Lists, creates, or deletes branches in your repository.