Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1--How to use git? #2

Open
cooljiansir opened this issue Nov 13, 2014 · 0 comments
Open

1--How to use git? #2

cooljiansir opened this issue Nov 13, 2014 · 0 comments

Comments

@cooljiansir
Copy link
Owner

Git----a better life!

When first time use git

    git config --global user.name xxxxx     #your name
    git config --global user.email xxxxx@gmail.com   #your email

fetch doc

    cd /home/workplace/ #/home/workplace is the directory you choose
    git init                #initialize
    git remote add origin https://github.com/cooljiansir/osniffer.git
    git fetch origin doc           #doc is the document branch,
    git checkout doc              #doc is the document branch
    ls                  #now you can see these documents!

push doc to the server

    cd /home/workplace      #the directory you choose
    git status              #see uncommited changes
    git add *               #if needed add some new files to git
    git commit -am "some comment..."    #commit your changes
    git push origin doc     #push your commit to the remote server

About the branchs

as the example above,we use doc branch,the same way to other branchs:

  • doc the document branch
  • web2 the html\css\js.... codes
  • master the cgi\server c code
@cooljiansir cooljiansir changed the title How to use git? 1--How to use git? Nov 14, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant