OsChina terminal command upload code, oschina terminal upload

Source: Internet
Author: User

OsChina terminal command upload code, oschina terminal upload

// First, check whether you have a public key. In my documents --> SSH Public Key view, if not, add your own SSH public key:

// SSH Key allows you to establish a secure encrypted connection between your computer and Git @ OSC

$ Ssh-T git@git.oschina.net

// If return
Welcome to Git @ OSC, zb_j!

// The SSH Public Key is successfully added.

BoyatekiMacBook-Pro-2 :~ Zbj $ cd/Users/zbj/project/osChina/weibo/Weibo
BoyatekiMacBook-Pro-2: Weibo zbj $ git init
Initialized empty Git repository in/Users/zbj/project/osChina/weibo/Weibo/. git/
BoyatekiMacBook-Pro-2: Weibo zbj $ git init.
Reinitialized existing Git repository in/Users/zbj/project/osChina/weibo/Weibo/. git/
BoyatekiMacBook-Pro-2: Weibo zbj $ cd/Users/zbj/project/osChina
BoyatekiMacBook-Pro-2: osChina zbj $ git pull git@git.oschina.net: zbsourcecode/weibo. git
Fatal: Not a git repository (or any of the parent directories):. git
BoyatekiMacBook-Pro-2: osChina zbj $ git init.
Initialized empty Git repository in/Users/zbj/project/osChina/. git/
BoyatekiMacBook-Pro-2: osChina zbj $ git pull git@git.oschina.net: zbsourcecode/weibo. git
Remote: Counting objects: 5, done.
Remote: Compressing objects: 100% (2/2), done.
Remote: Total 5 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (5/5), done.
From git.oschina.net: zbsourcecode/weibo
* Branch HEAD-> FETCH_HEAD
BoyatekiMacBook-Pro-2: osChina zbj $ git add-.
BoyatekiMacBook-Pro-2: osChina zbj $ git commit-am "first remote code commit"
On branch master
Nothing to commit, working directory clean
BoyatekiMacBook-Pro-2: osChina zbj $ git add-A Weibo /.
BoyatekiMacBook-Pro-2: osChina zbj $ git commit-am "first remote code commit"
On branch master
Untracked files:
Weibo. textClipping

Nothing added to commit but untracked files present
BoyatekiMacBook-Pro-2: osChina zbj $ git rm Weibo. textClipping
Fatal: pathspec 'weibo. textClipping 'did not match any files
BoyatekiMacBook-Pro-2: osChina zbj $ git commit-am "first remote code commit"
On branch master
Nothing to commit, working directory clean
BoyatekiMacBook-Pro-2: osChina zbj $ git status
On branch master
Nothing to commit, working directory clean
BoyatekiMacBook-Pro-2: osChina zbj $ git commit-m "first remote code commit"
On branch master
Nothing to commit, working directory clean
BoyatekiMacBook-Pro-2: osChina zbj $ cd Weibo
BoyatekiMacBook-Pro-2: Weibo zbj $ git add.
Assertion failed: (item-> nowildcard_len <= item-> len & item-> prefix <= item-> len), function prefix_patheat EC, file patheat EC. c, line 317.
Abort trap: 6
BoyatekiMacBook-Pro-2: Weibo zbj $ cd/Users/zbj/project/osChina
BoyatekiMacBook-Pro-2: osChina zbj $ git add Weibo/
Fatal: Unable to create '/Users/zbj/project/osChina/. git/index. lock': File exists.

If no other git process is currently running, this probably means
Git process crashed in this repository earlier. Make sure no other git
Process is running and remove the file manually to continue.
BoyatekiMacBook-Pro-2: osChina zbj $ git add Weibo /.
Fatal: Unable to create '/Users/zbj/project/osChina/. git/index. lock': File exists.

If no other git process is currently running, this probably means
Git process crashed in this repository earlier. Make sure no other git
Process is running and remove the file manually to continue.
BoyatekiMacBook-Pro-2: osChina zbj $ cd/Users/zbj/project/osChina
BoyatekiMacBook-Pro-2: osChina zbj $ git init
Initialized empty Git repository in/Users/zbj/project/osChina/. git/
BoyatekiMacBook-Pro-2: osChina zbj $ git remote add origin git@git.oschina.net: zbsourcecode/weibo. git
BoyatekiMacBook-Pro-2: osChina zbj $ git add.
BoyatekiMacBook-Pro-2: osChina zbj $ git commit-a-m "first commit"
[Master (root-commit) b2bf26b] first submission
441 files changed, 24645 insertions (+)
Create mode 100644 Weibo. xcodeproj/project. pbxproj
........................................ ....................
Create mode 100644 WeiboTests/WeiboTests. m
BoyatekiMacBook-Pro-2: osChina zbj $ git pull origin master
Warning: no common commits
Remote: Counting objects: 5, done.
Remote: Compressing objects: 100% (2/2), done.
Remote: Total 5 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (5/5), done.
From git.oschina.net: zbsourcecode/weibo
* Branch master-> FETCH_HEAD
* [New branch] master-> origin/master
Adding Weibo/main. m
........................................ ........
Adding Weibo/Base. lproj/LaunchScreen. xib
CONFLICT (directory/file): There is a directory with name Weibo in HEAD. Adding Weibo as Weibo ~ 3b0a93b55a67db54b9797b66856335c9fffe04c4
Automatic merge failed; fix conflicts and then commit the result.
BoyatekiMacBook-Pro-2: osChina zbj $ open.
BoyatekiMacBook-Pro-2: osChina zbj $ cd/Users/zbj/project/osChina/weibo
BoyatekiMacBook-Pro-2: weibo zbj $ git init
Initialized empty Git repository in/Users/zbj/project/osChina/weibo/. git/
BoyatekiMacBook-Pro-2: weibo zbj $ git remote add orgin git@git.oschina.net: zbsourcecode/weibo. git
BoyatekiMacBook-Pro-2: weibo zbj $ git add.
BoyatekiMacBook-Pro-2: weibo zbj $ git commit-a-m "first initialization"
On branch master

Initial commit

Nothing to commit
BoyatekiMacBook-Pro-2: weibo zbj $ git pull origin master
Fatal: 'origin' does not appear to be a git repository
Fatal: cocould not read from remote repository.

Please make sure you have the correct access rights
And the repository exists.
BoyatekiMacBook-Pro-2: weibo zbj $ open.
BoyatekiMacBook-Pro-2: weibo zbj $ git add.
BoyatekiMacBook-Pro-2: weibo zbj $ git commit-a-m "first initialization"
[Master (root-commit) 4050f49] initial Initialization
441 files changed, 24645 insertions (+)
Create mode 100644 Weibo/Weibo. xcodeproj/project. pbxproj
........................................ ....................
Create mode 100644 Weibo/WeiboTests. m
BoyatekiMacBook-Pro-2: weibo zbj $ git pull origin master
Fatal: 'origin' does not appear to be a git repository
Fatal: cocould not read from remote repository.

Please make sure you have the correct access rights
And the repository exists.
BoyatekiMacBook-Pro-2: weibo zbj $ open push orgin master
The files/Users/zbj/project/osChina/weibo/push,/Users/zbj/project/osChina/weibo/orgin, and/Users/zbj/project/osChina/weibo/master do not exist.
BoyatekiMacBook-Pro-2: weibo zbj $ git push origin master
Fatal: 'origin' does not appear to be a git repository
Fatal: cocould not read from remote repository.

Please make sure you have the correct access rights
And the repository exists.
BoyatekiMacBook-Pro-2: weibo zbj $ clear

BoyatekiMacBook-Pro-2: weibo zbj $ git config -- global user. name "zb_j"
BoyatekiMacBook-Pro-2: weibo zbj $ git config -- global user. email "1357316621@qq.com"
BoyatekiMacBook-Pro-2: weibo zbj $ git init
Initialized empty Git repository in/Users/zbj/project/osChina/weibo/. git/
BoyatekiMacBook-Pro-2: weibo zbj $ touch README. md
BoyatekiMacBook-Pro-2: weibo zbj $ git add README. md
BoyatekiMacBook-Pro-2: weibo zbj $ git commit-m "first commit"
[Master (root-commit) 46f1533] first commit
1 file changed, 0 insertions (+), 0 deletions (-)
Create mode 100644 README. md
BoyatekiMacBook-Pro-2: weibo zbj $ git remote add origin https://git.oschina.net/zbsourcecode/weibo.git
BoyatekiMacBook-Pro-2: weibo zbj $ git push-u origin master
Counting objects: 3, done.
Writing objects: 100% (3/3), 206 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To https://git.oschina.net/zbsourcecode/weibo.git
* [New branch] master-> master
Branch master set up to track remote branch master from origin.
BoyatekiMacBook-Pro-2: weibo zbj $ cd/Users/zbj/Desktop/Weibo
BoyatekiMacBook-Pro-2: Weibo zbj $ git remote add origin https://git.oschina.net/zbsourcecode/weibo.git
Fatal: Not a git repository (or any of the parent directories):. git
BoyatekiMacBook-Pro-2: Weibo zbj $ open.
BoyatekiMacBook-Pro-2: Weibo zbj $ cd/Users/zbj/project/osChina/weibo
BoyatekiMacBook-Pro-2: weibo zbj $ git add.
BoyatekiMacBook-Pro-2: weibo zbj $ git add ./
BoyatekiMacBook-Pro-2: weibo zbj $ git commit-m "add existing project"
[Master 2364694] add an existing project
441 files changed, 24645 insertions (+)
Create mode 100644 Weibo/Weibo. xcodeproj/project. pbxproj
........................................ ........
Create mode 100644 Weibo/WeiboTests. m
BoyatekiMacBook-Pro-2: weibo zbj $ git remote add origin https://git.oschina.net/zbsourcecode/weibo.git
Fatal: remote origin already exists.
BoyatekiMacBook-Pro-2: weibo zbj $ git push-u origin master
Counting objects: 600, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (592/592), done.
Writing objects: 100% (599/599), 1.78 MiB | 12.00 KiB/s, done.
Total 599 (delta 159), reused 0 (delta 0)
To https://git.oschina.net/zbsourcecode/weibo.git
46f1533 .. 2364694 master-> master
Branch master set up to track remote branch master from origin.
BoyatekiMacBook-Pro-2: weibo zbj $
At this point, the submission is successful.

 

 

Related Article

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.