A
A
alysenko2017-10-17 11:23:41
git
alysenko, 2017-10-17 11:23:41

How to link a local repository to a remote one (on bitbucket)?

There is such a situation:
There is a project on bitbucket , I downloaded it as an archive. The archive was downloaded without git.
Now I need to link my local code to the remote repository.
How can I do that?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
J
jcmvbkbc, 2017-10-17
@jcmvbkbc

Clone the project from git, copy your changes made in the unpacked archive over, commit.

P
Pavel Rogov, 2017-10-17
@RogovP

It is necessary not to download the archive, but to do git clone *repository url*
1. First you need to install git.
2. Open the terminal, create a folder where the project will be
3. Run the command git clone *repository url* in the folder and create a new branch (git checkout -b *branch name*)
4. Make your changes
5. Recheck, add to the index ( git add *file you changed*). Git status will also help with this (it will show the local state, files that have been changed, but not added to the index, etc.)
6. Commit (git commit -m "comment")
7. Upload to the server (git push origin *branch name* )

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question