difference between git remote and git clone

0 votes

What is the difference between git remote and git clone?

May 11, 2018 in Git & GitHub by GandalfDwhite
• 1,320 points
222 views

2 answers to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

They are two completely different things.

git remote is used to refer to a remote repository or your central repository.

For e.g: When you want to add a remote repository as your origin, you use this command:

image

git clone is used to copy or clone a different repository.

image

To learn more about the git commands, read this blog:

Git Tutorial | Commands And Operations In Git | Edureka

answered May 11, 2018 by DragonLord999
• 8,360 points
0 votes

git remote add just creates an entry in your git config that specifies a name for a particular URL. You must have an existing git repo to use this.

git clone creates a new git repository by copying an existing one located at the URI you specify.

Try this out:

# git clone REMOTEURL foo

and:

 # mkdir foo
 # cd foo
 # git init
 # git remote add origin REMOTEURL
 # git pull origin master

Now there are minor differences, but fundamentally you probably won't notice them. As an exercise left to the reader, compare the .git/config's from each directory.

answered Aug 7, 2018 by Kalgi
• 35,720 points

Related Questions In Git & GitHub

0 votes
1 answer

difference between git fetch and git pull

Both fetch and pull are used to ...READ MORE

answered Jun 27, 2018 in Git & GitHub by anonymous
371 views
0 votes
2 answers

What's the difference between git push and git commit?

I installed ubuntu on vagrant and gave ...READ MORE

answered Jan 2 in Git & GitHub by Ali
• 10,290 points
58 views
0 votes
1 answer
0 votes
2 answers

Delete a git branch locally and remotely

Deleting a remote branch: git push origin --delete ...READ MORE

answered Aug 20, 2018 in Git & GitHub by Nilesh
• 6,900 points
54 views
+13 votes
2 answers
0 votes
1 answer
0 votes
1 answer

Configure Git and GitHub

In version control with Git, we deal ...READ MORE

answered Apr 26, 2018 in Git & GitHub by DragonLord999
• 8,360 points
14 views
0 votes
1 answer

Git origin not found

For this to work, you need to ...READ MORE

answered Apr 25, 2018 in Git & GitHub by DragonLord999
• 8,360 points
47 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.