git clone https://github.com/octocat/Spoon-Knife
and git clone https://github.com/octocat/Spoon-Knife.git
?
git clone https://github.com/octocat/Spoon-Knife
and git clone https://github.com/octocat/Spoon-Knife.git
?
is followed by whether or not to add a url,. Git depends on the format of the url provided by the resource you are using.
github is now compatible with both url formats.
there is essentially no difference. It's just that the remote file system is named differently.
but as far as git is concerned. There are still some details to know.
git init is used to initialize a warehouse.
git init-- bare is used to initialize a pure repository.
Pure Warehouse means that there is only a version library, not a working directory. It is often used as a remote repository for development teams. Store the code centrally. Without a workspace.
We know that the code you cloned yourself has a hidden folder in the root directory. Git / this is where the metafiles of the version library are stored.
so habitually: if you want to initialize a pure repository, you will name the directory in the form of yourproject.git. To make it clear that he is a pure warehouse that does not contain a workspace.
now that you know the answer, answer it yourself.
git
will help you make up .git
, but will not help you get rid of .git
.
when you use git clone xxx
, git
will first look for xxx
, if not, go to xxx.git
;
when you use git clone xxx.git
, git
will only look for xxx.git
.
xxx.git
is bare repositories
(server side), xxx
is working tree
(local) git clone xxx
or git clone xxx.git
will eventually go to xxx.git
.
git init-- bare
generate bare repositories
will only receive push, not local development. The files / folders generated by
are directly
in the specified directory, as shown in the figure left
below.
git init
generate working tree
for local development. The files / folders generated by
are in the .git
directory under the specified directory, as shown in the following figure to the right
.
< hr >
reference:
in fact, I also want to know the difference. I have looked up a lot of information and need to add .git after git clone.
if you use git push, only the latest commit, will not be uploaded before commit. ...
such as the source code of node, is this the source code of someone else s fork, but this project on his home page does not show fork? is it because this boss has contributed to this project, has done pr, and has been merge or for some other reason? ...
I don t know that one day I started to create a project in G disk and suddenly this is displayed. I can t create it, so I can only create it on other disks. on this question, someone mentioned an issue, in the official warehouse, just like me, but...
computer is mac, system is high sierra 10.13.4 use ssh to configure github and Code Cloud, which are already configured. If you have tested github and Code Cloud with ssh-t, you will find that they are successful and git clone has been tested. then ...
A new project is created in < H2 > visual studio, and init git < H2 > < hr > on this basis, how to upload to github, so that every local master can be updated smoothly. You can also choose push to origin master . < H1 > Thank you < H1 > ...
node_modules this folder has been ignore by me but there is an elementUI folder under node_modules, and I have modified the files in it so the effect I want: only upload the elementUI, under node_modules and do not upload the rest. How can I do th...
...
IFE2018 day7git add day7 can t I add folders? ...
I have an old account that has been useless for years. Installed a new computer, then wrote a little bit and submitted it to my warehouse, only to find that it was all submitted by my old account? Why is this? even if my account is confused, it is said...
I created the github repository and added my colleague s public key. How can I make my colleague see only the specified branches? For example, you can t see the branches of other colleagues? ...
Where can I provide the default template for a project s issue on GITHUB? (that is, New issue automatically generates default templates) something like this: Contribute.md ~ ...
...
when I m about to finish building, Permission denied, please try again appears when I use ssh-v git@service. It still doesn t work after trying to enter the correct password. I have tried all the methods on the Internet. It hasn t been solved yet. I ...
problem description update, today s git push has a different ip error. $git push packet_write_wait: Connection to 52.74.223.119 port 22: Broken pipe fatal: Could not read from remote repository. Please make sure you have the correct access r...
< H2 > the problem of "warehouse path " does not appear to be a git repository occurred in the push code on Aliyun code < H2 > error message: fatal: disk1 repositories lostexin test.git does not appear to be a git repository gitlab git ......
I don t know how to push or something, but it has been updated on github and localhost:4000, but there is no update in the blog. in fact, the workstation I was using was moved here, and then a new branch of hexo was created in github s library, and t...