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

Moving my local source files to Bitbucket repository

Seshadri Ramaswami
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 28, 2023

I have two copies of my programs, one in a Mac laptop and another in an Ubuntu machine. To eliminate inconsistency, I want to copy these programs to my Bitbucket repository and subsequently work only on this to ensure version control and consistency. How do I copy the set of source files from (a) Ubuntu machine and (b) Mac laptop?

1 answer

0 votes
Jens Schumacher - Released_so
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 28, 2023

Sure, there are a few ways to copy the set of source files from your Ubuntu machine and Mac laptop to your Bitbucket repository.

(a) Ubuntu machine

  1. Open a terminal window.
  2. Navigate to the directory where the source files are located.
  3. Run the following command to clone the repository:
git clone git@bitbucket.org:your_username/your_repository.git
  1. The repository will be cloned to a new directory called your_repository.

(b) Mac laptop

  1. Open a terminal window.
  2. Navigate to the directory where the source files are located.
  3. Run the following command to clone the repository:
git clone https://bitbucket.org/your_username/your_repository.git
  1. The repository will be cloned to a new directory called your_repository.

Once the repository has been cloned, you can start working on it locally. Any changes you make to the files will be automatically tracked by Git. When you are ready to push your changes to the remote repository, you can run the following command:

git push origin master

This will push your changes to the master branch of the repository on Bitbucket.

To ensure version control and consistency, you should always work on the master branch of your repository. If you need to create a new branch, you can do so by running the following command:

Code snippet
git checkout -b new_branch

Once you have created a new branch, you can work on it independently of the master branch. When you are ready to merge your changes back into the master branch, you can run the following command:

git merge new_branch

This will merge the changes from the new_branch branch into the master branch.

I hope this helps! Let me know if you have any other questions.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events