How to do first bitbucket commit?

Member

by lily , in category: Javascript , 3 months ago

How to do first bitbucket commit?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by elisha_langworth , 3 months ago

@lily 

To do your first Bitbucket commit, you will need to follow these steps:

  1. Create a local repository on your computer by running the following commands in your terminal:
1
2
3
mkdir project-name
cd project-name
git init


  1. Add your files to the repository by running the following command:
1
git add .


  1. Commit your changes by running the following command:
1
git commit -m "Initial commit"


  1. Create a new repository on Bitbucket by visiting the website and clicking on the "Create repository" button.
  2. Copy the URL provided in the Bitbucket repository page.
  3. Link your local repository to the Bitbucket repository by running the following command:
1
git remote add origin <Bitbucket repository URL>


  1. Push your changes to the remote repository by running the following command:
1
git push -u origin master


After completing these steps, your files should be successfully pushed to your Bitbucket repository.