How to upload a local git repository to GitHub hosting + hands-on experience

Source: Internet
Author: User
Tags hosting using git

git--Getting started with uploading items to a remote repository GitHub (EXT)-chen_s-Blog Park
Http://www.cnblogs.com/Chenshuai7/p/5486278.html

Note the issue:

1. At that time in the MyEclipse changed the code, and then all kinds of add,commit can not change, find a half-day reason, and finally found in MyEclipse Riga is a copy of the project, is the original Git repository does not change ... As if to make the original as a backup, I set the default is copy to Meclipse, so in the MyEclipse load project to note that the Git repository is still built in the replica project, oh, but since the first time the original code submitted to GitHub, That can be modified on the original, after all, you can return

2. The second problem is that when using Git, the steps are as follows:

    • Open git bash
    • The project root directory to be managed is the working directory
    • Go to working directory: CD
    • In this directory git init creates a new Git repository, which generates a. git folder (do not move)
    • If you want to update the files under this directory sub-file, you need to add a relative path under the working directory. No path, default to working directory (that is, directory where git resides)

3. Some common commands

Git init: New Empty Warehouse

git config: Configuration tool

--system: Read-write./etc/gitconfig file: Contains values that apply to all users of the system and to all libraries.

--global:. Read and write ~/.gitconfig files: specific to your users.

No: Read and write. config file under git

Properties in: User.name,user.email,core.editor,merge.tool

Git add: Add a change file to upload

Git commit: The added change file is passed into the local repository. In Git

Git Status: View related information

git clone https://... : Cloning a project from GitHub

Git push origin master: Place the local repository. Projects in Git are pushed to GitHub

(go) How to upload a local git repository to GitHub hosting + hands-on experience

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.