Git

Some Git commands:

Before dev:

Check Branch: git branch

Checkout an existing branch : git checkout XXX

Get Latest code from remote branch: git pull

Check branch Status: git status

Create a new Branch:  git checkout -b bug/dashboard

After finishing code:

Commit your change: git commit -am “this is what I do”

Push your change back to remote: git push

The process of incorporating and publishing changes uses the following set of commands. I pull my changes from the remote repository to automatically incorporate them into the repository. This procedure fetches the new changes and then merges them into the tracked copy of the local branch. At any given time, I work on a local branch within my repository. If I want to share my changes with other developers, I commit my work to the repository, and then push my branch to the remote repository.

Repository:

Uncommited Code:

commit:

stash:temporarily shelve the changes

discard: 

原文地址:https://www.cnblogs.com/renyualbert/p/6145035.html