Github is in a workspace. Nested

Administrator@USER-20200307HH MINGW64 /f/Git (master)
$ git remote add origin [email protected]:Captain-Soap/fromF.git
fatal: remote origin already exists.

 

Administrator @ USER-20200307HH MINGW64 / f / Git (master) ----------------------------- This question is mentioned in the note and collection Over
$ git remote rm origin

 

Administrator@USER-20200307HH MINGW64 /f/Git (master)
$ git remote add origin [email protected]:Captain-Soap/fromF.git

 

Administrator@USER-20200307HH MINGW64 /f/Git (master)
$ git push -u origin master
To github.com:Captain-Soap/fromF.git
! [rejected] master -> master (fetch first)
error: failed to push some refs to '[email protected]:Captain-Soap/fromF.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

 

Administrator @ USER-20200307HH MINGW64 / f / Git (master) ----------------------------〉 It can be seen that it must be written accurately
$ git pull -rebase origin master
error: Invalid value for --rebase: ebase

 

Administrator@USER-20200307HH MINGW64 /f/Git (master) --------------------------〉同上
$ git pull - rebase origin master
fatal: strange pathname '-' blocked

 

Administrator @ USER-20200307HH MINGW64 / f / Git (master)
$ git pull --rebase origin master ---------------------------〉 will The readme in the remote library is pulled into the local code, after which we can push
remote: Enumerating objects: 3, done.
Remote: Counting objects: 100% (3/3), done.
Remote: Total 3 (delta 0 ), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (3/3), 593 bytes | 0 bytes / s, done.
From github.com:Captain-Soap/fromF
* branch master-> FETCH_HEAD
* [new branch] master-> origin / master
Successfully rebased and updated refs / heads / master.

 

Administrator@USER-20200307HH MINGW64 /f/Git (master)
$ git push -u origin master
Enumerating objects: 4, done.
Counting objects: 100% (4/4), done.
Delta compression using up to 4 threads
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 307 bytes | 307.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
To github.com:Captain-Soap/fromF.git
a029478..8985a28 master -> master
Branch 'master' set up to track remote branch 'master' from 'origin'.

 

Administrator@USER-20200307HH MINGW64 /f/Git (master)
$ git status
On branch master
Your branch is up to date with 'origin/master'.

Untracked files:
(use "git add <file> ..." to include in what will be committed)
test / ------------------------- -------------------------------------> There is also a README in the test (obviously this is github Clone something locally)

nothing added to commit but untracked files present (use "git add" to track)

 

Administrator @ USER-20200307HH MINGW64 / f / Git (master)
$ git add test --------------------------------- ---------------------------〉 Because the above said she was not track
warning: adding embedded git repository: test
hint: You've added another git repository inside your current repository.
hint: Clones of the outer repository will not contain the contents of
hint: the embedded repository and will not know how to obtain it.
hint: If you meant to add a submodule , use: https://www.cnblogs.com/lsgxeva/p/8540758.html Cloud water blog post
hint:
hint: git submodule add <url> test
hint:
hint: If you added this path by mistake, you can remove it from the
hint: index with:
hint:
hint: git rm --cached test
hint:
hint: See "git help submodule" for more information.

 

Now there is such a situation in Github: (Of course there is a.txt in fromF)

This is the situation now:

I cloned the test in github to the local, and want to get the test in this workspace to the repository and local branch (weird iead)

as you can see

You've added another git repository inside your current repository. My Git is a repository, so this one pulled from github is also a new repository that I ordered by myself, the library in the library

Translate

Cloning the outside library (Git) will not include the inside library (test) (but my git add is inside, or does a library need not be added?)

Yes, test is equivalent to your Git workspace

There is an article here https://blog.csdn.net/qq_35082030/article/details/74893853 that shows that this file is inconsistent with the repository, so only mandatory deletion.

Here is a foreigner who has the same problem as me

galath also said

 

But I still don't know if this is related to trees? ? ? Confused, will you understand in the future?

 

And I also ran with the problem, aimless, take your time!

Come on Xiaobai.

Guess you like

Origin www.cnblogs.com/penen/p/12740332.html