Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- git init: Initializes a new Git repository.
- git clone [repository_url]: Clones a Git repository from the specified URL to your local machine.
- git add [file]: Adds a file or directory to the staging area.
- git commit -m "[commit message]": Commits changes to the local repository with a message describing the changes.
- git push: Pushes changes to a remote repository.
- git pull: Fetches and merges changes from a remote repository.
- git status: Displays the status of files in the working directory.
- git log: Displays a history of commits.
- git branch: Lists all the branches in the repository.
- git checkout [branch_name]: Switches to a different branch.
- git merge [branch_name]: Merges changes from the specified branch into the current branch.
- git remote: Lists the remote repositories associated with the local repository.
- git fetch: Downloads changes from a remote repository, but does not merge them.
- git diff: Shows the differences between the working directory and the last commit.
- git reset: Resets the repository to a previous commit.
- git config: Used to set configuration options for Git on a global, local, or per-repository basis.
- git stash: Temporarily saves changes that are not ready to be committed, allowing you to switch branches or work on other tasks.
- git tag: Marks a specific commit with a tag, allowing you to easily reference it in the future.
- git blame [file]: Shows who made each change to a specific file and when.
- git remote add [remote_name] [remote_url]: Adds a new remote repository to the local repository.
- git revert [commit]: Reverts the changes introduced by a specific commit, creating a new commit that undoes the changes.
- git cherry-pick [commit]: Applies the changes introduced by a specific commit to the current branch.
- git submodule: Used to include a Git repository as a subdirectory of another Git repository.
- git bisect: Helps you locate a specific commit that introduced a bug by performing a binary search through the commit history.
- git reflog: Shows a log of all Git commands that have been run in the repository, even if they have been undone or removed.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement