first question: is there a primary branch and a secondary branch in
Git? Read the article that master is the main branch, so if you create a new branch at this time, will the other branches be considered sub-branches?
read the article and learned that there seems to be a distinction between primary and secondary, for example, master is the primary branch, and other newly built secondary branches test, then when modifying master, such as add and commint to master, then the secondary branch test will naturally have these files; if you create a new file under the test branch but do not have add and commit, then you still cannot see the new file under the test if you switch to master, right? Only after add and cimmint under the test branch, can you see the newly created file under test only if you switch to master, right?
but the problem now is that the newly created file under the test branch does not have any add or commit. After switching to the master branch, you can still see the new file.
what"s the point of branching in this way? Or is it the git of my computer?
in addition, is it possible for post-established branches to see the content that has been built before, even without add and commit??
second question:
can a local git library clone many other github repositories on the Internet? Give it a try, it"s okay.
this is the branch after I cloned a library on the Internet as follows:
`[root@localhost test]-sharp git branch -a
* dev
master
test
remotes/origin/HEAD -> origin/master
remotes/origin/master
`
where `master
test
remotes/origin/HEAD -> origin/master
remotes/origin/master`
these are from the library, and I built dev.
question 1.
master
test
remotes/origin/HEAD -> origin/master
remotes/origin/master
here
remotes/origin/HEAD-> origin/master
remotes/origin/master
what is the difference between the two?
question 2. I create any file under the newly created dev, and you can see it under the master and test branches. Why is this?
didn"t you say you can"t see it until you add,commit it?
question 3. Clone can you clone a folder?
for example, if a project has three A B C projects, can you refer to the folder Clone A?
question 4. Link question:
use:
echo "-sharp test" >> README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin git@github.com:Xoodge/test.git -sharpgit
git push -u origin master
What is the difference between the statement establishing my own github link and the test being cloned by me?
my own understanding. 1. This github has my SSHkey in it, so I can git remote add origin git@github.com:Xoodge/test.git, right? I can"t git remote add origin git@github.com:Xoodge/test.git without my SSH, right?
2. This way of establishing a connection means that I can update the remote test as long as I am local to add, commit and push, right? But if this is cloned, then I want pull request?.