Uploading code to GitHub under Linux

Source: Internet
Author: User

Upload code:

CD TPS/DEVICES/M8

GIT init #//initialization

git Add. #如果是. means to upload files in all directories, which can be a file

Git commit-m ' version 1.0 '

Git remote add Origin https://github.com/jiugui1/TOS.git

Git push Origin master-f

#[email protected]:~/tos/tps/devices/m8$ git push Origin master-f

Username for ' https://github.com ': [email protected]//Enter GitHub account

Password for ' https://[email protected] @github. com '://Enter the GitHub login password

If you enter Git remote add origin [email protected]:d Jqiang (GitHub account name)/gitdemo (project name). Git

Tip error Message: Fatal:remote origin already exists.

The solution is as follows:

1. First enter GIT remote RM origin

2. Re-enter Git remote add origin [email protected]:jiugui1/tos.git

You won't get an error!

git filter-branch--tree-filter ' rm-f webroot/web-inf/lib/*.jar '--tag-name-filter cat----all

Git push Origin--tags--force

Git push Origin--all--force


Big file kills people!!! Unable to upload files larger than 100M!!!


git rm--cachedbackup/20151119143722/package/m8.zip


Uploading code to GitHub under Linux

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.