Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to pull down remote repository to local existing cloned folder?

Hi,

how can I pull down remote repository data to my local existing folder?

The local existing git folder has the cloned remote repository data from several days ago and I need to update the local git folder in case any changes have been made on the remote repository.

I tried git init, but that messed up the system.

I tried deleting the local git folder, making a new folder and running git clone but that messes up the system.

Any suggestions please?

2 answers

1 accepted

0 votes
Answer accepted

Hello,

Thank you for your question.

In order to accomplish what has been asked, please follow the steps:

Configure Git for the first time

git config --global user.name "Administrator"
git config --global user.email "admin@localhost.com"

Working with your repository

I just want to clone this repository

If you want to simply clone this empty repository then run this command in your terminal.

git clone http://<user>@<gitserver>/repository.git
# or
git clone ssh://<user>@<gitserver>/repository.git

My code is ready to be pushed

If you already have code ready to be pushed to this repository then run this in your terminal.

cd existing-project git init
git remote add origin ssh://<user>@<gitserver>/repository.git
git add --all 
git commit -m "Initial Commit" 
git push origin master

My code is already tracked by Git

If your code is already tracked by Git then set this repository as your "origin" to push to.

cd existing-project
git remote set-url origin ssh://<user>@<gitserver>/repository.git
git push origin master
# Update your local repo from the remote (but don't merge):
git fetch

# After downloading the updates, let's see the differences:
git diff origin/master

# If you're happy with those updates, then merge:
git pull

Please, refer to Git - Reference for further information.

Kind regards,
Rafael

Thank you, this seems helpful.

I will try to code and see how it goes.

Seems to cover problems noobs might experience with the 1st time confustion of git.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Atlassian Cloud Migration

Curious what we've got planned for 2021?!

Happy 2021, Atlassian Community! 2020 was a year with lots of change. It changed how we work, live, and even interact with our neighbors. As we wrapped up 2020 in December, we got to thinkin...

118 views 1 5
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you