git basic steps

A, Git
configuration environment:
1, by git init command to manage a directory into Git repository;
2, generates a public key secret key: ssh key ssh-keygen -t rsa -C "for [email protected]" (E-mail)
3, public key configuration in the GitHub Setting
3, the user name and mailbox associated with the remote gith of
$ git config --global user.name "the name Your"
$ git config --global user.email "[email protected] "
operation:
1, pull content remote library from the branch: git pull origin dev (branch name)
2, the project line modification
3, to project the modified add to this branch:. Git add
. 4, the local branch content submitted to the staging repository: git commit -m "comment"
5, the contents of the temporary repository to push to a remote repository: git push -u origin dev (branch name) // premise: in which branch which go out into the catalog push remote branch
6, is switched to the main branch master: git checkout master (name)
7, merging branches: git merge dev (branch name)

Delete local branch: git branch -d [branchname]
Delete a remote branch: git push origin --delete [branchname]
create a branch: git checkout -b [branchname]

Guess you like

Origin www.cnblogs.com/xzybk/p/11313267.html