What is GitHub?

GitHub is a code hosting platform for version control and collaboration. It lets you and others work together on projects from anywhere.

Install Git

  • Linux

sudo apt-get install git

  • Mac OS X

    • homebrew

      Please refer to the documentation: [homebrew][1]

    • Xcode

      • Xcode -> Preferences

      • Downloads -> Command Line Tools -> Install

  • Window

    • msysgit

      Please refer to the link: [git for windows][2]

For further configuration:

$ git config --global user.name "Your Name"

$ git config --global user.email "[email protected]"

Notice: git config --global will set all of your project using the same username, you can certainly use different accounts for different projects.

Create a new repository

  • Create a remote repository on GitHub.com

  • Clone the repository

    git clone https://github.com/your.username/your.project.git
    
  • Add file to repository

    $ touch readme.txt
    $ git add readme.txt
    
  • Submit file to repository
    git commit -m "wrote a readme file"
    
  • Push to the remote repository
    git push -u origin master
    

https://www.liaoxuefeng.com/wiki/0013739516305929606dd18361248578c67b8067c8c017b000

https://guides.github.com/activities/hello-world/

https://guides.github.com/

[1]: https://brew.sh/

[2]: https://git-for-windows.github.io/

results matching ""

    No results matching ""