git clone XXXX
Clone a project from a remote repository, where XXXX
is the URL of the repository.
git add -A
Add all changes (new files, modified files, deleted files) to the staging area.
git add XXXX
Add a specific file or directory to the staging area, where XXXX
is the path to the file or directory.
git commit -m XXXX
Commit the staged changes with a message, where XXXX
is the commit message.
git status
Show the status of the working directory and staging area, including untracked files, modified files, and staged files.
git log
Show the commit history, including commit hashes, authors, dates, and commit messages.
git push
Push the committed changes to the remote repository.
git pull
Fetch and merge changes from the remote repository to the local repository.
git branch
List all branches in the local repository, highlighting the current branch.
git branch XXXX
Create a new branch named XXXX
.
git checkout XXXX
Switch to the branch named XXXX
.
git merge XXXX
Merge the changes from branch XXXX
into the current branch.
git branch
List all branches in the local repository, highlighting the current branch.