First check your user info.
                    
                        git config user.name
                        git config user.email
                    
                
Then config your git user info.
                    
                        git config --global user.name "kidwen"
                        git config --global user.email "[email protected]"
                    
                
Clone your repository.
                        
                            git clone [email protected]:kidwen/git-flow.git
                            // or
                            git clone https://github.com/kidwen/git-flow.git
                        
                    
Check you repository.
                        
                            git remote -v
                            // origin  https://github.com/kidwen/git-flow.git (fetch)
                            // origin  https://github.com/kidwen/git-flow.git (push)
                        
                    
Check the branches and switch another branch.
                    
                        git branch -a
                    
                
Then you can switch to other branch if the branch exited.
                        
                            git checkout dev
                            // or
                            git switch dev
                        
                    
Or create a new branch base on this branch by use params `-b`.
                        
                            git checkout -b dev
                            // or
                            git switch -c dev
                        
                    
How to push your code to remote repository?
                    
                        # check witch file has been changed
                        git status
                        # add all files
                        git add .
                        # set this commit message
                        git commit -m "commit message"
                        # push code to remote repository
                        git push -u origin dev
                    
                
Rebase code.
If you current branch is dev, and you want rebase to master.
                    
                        # fetch the latest changes form remote git repository.
                        git fetch
                        # integrate changes from one branch into another
                        git rebase origin/master
                        # if you have a conflicts, resolve it and use next command
                        git rebase --continue
                        # or you want to cancel the rebasing
                        git rebase --abort
                    
                
🔄 Then you can push code to the remote.
Cherry Pick
Cherry-picking can help u choose a or more commit form one branch and applying it to another.
                    
                        git switch master
                        git cherry-pick <commit-hash>
                    
                
Add Tag.
if you want add tag for before commit, first you need checkout to that commit.
                    
                        # checkout to that commit by commit id
                        git checkout < commit id >
                        # add a tag for current commit.
                        git tag release-1.0.0
                        # push the tag to origin repository
                        git push origin release-1.0.0
                    
                
🏠 back to start.