You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Setting up Git git config --global user.name "Your Name" : Set your Git username git config --global user.email "[email protected]" : Set your Git email address git config --list : List all Git configuration settings
Creating a new repository git init : Create a new local repository git clone [url]: Clone an existing repository from a remote source
Adding and committing changes git add [file] : Add changes to the staging area git add . : Add all changes to the staging area git commit -m "Commit message" : Commit changes to the local repository with a message
Working with branches git branch: List all branches git branch [branch-name]: Create a new branch git checkout [branch-name]: Switch to a specific branch git merge [branch-name] : Merge changes from a specific branch into the current branch git push origin [branch-name] : Push changes to a remote repository
Working with remote repositories git remote add origin [url] : Add a remote repository git pull : Fetch and merge changes from a remote repository git push : Push changes to a remote repository git remote -v : List all remote repositories
Other helpful commands git status: Show the status of your repository git log : Show the commit history of your repository git diff [file]: Show the changes made to a specific file.
Đây là một số lệnh Git được sử dụng phổ biến nhất. Tôi hy vọng bảng cheat này sẽ giúp bạn trong hành trình Git của mình!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Setting up Git
git config --global user.name "Your Name"
: Set your Git usernamegit config --global user.email "[email protected]"
: Set your Git email addressgit config --list
: List all Git configuration settingsCreating a new repository
git init
: Create a new local repositorygit clone [url]
: Clone an existing repository from a remote sourceAdding and committing changes
git add [file]
: Add changes to the staging areagit add .
: Add all changes to the staging areagit commit -m "Commit message"
: Commit changes to the local repository with a messageWorking with branches
git branch
: List all branchesgit branch [branch-name]
: Create a new branchgit checkout [branch-name]
: Switch to a specific branchgit merge [branch-name]
: Merge changes from a specific branch into the current branchgit push origin [branch-name]
: Push changes to a remote repositoryWorking with remote repositories
git remote add origin [url]
: Add a remote repositorygit pull
: Fetch and merge changes from a remote repositorygit push
: Push changes to a remote repositorygit remote -v
: List all remote repositoriesOther helpful commands
git status
: Show the status of your repositorygit log
: Show the commit history of your repositorygit diff [file]
: Show the changes made to a specific file.Đây là một số lệnh Git được sử dụng phổ biến nhất. Tôi hy vọng bảng cheat này sẽ giúp bạn trong hành trình Git của mình!
Beta Was this translation helpful? Give feedback.
All reactions