How to Add an Existing Project folder on Your Computer to a New Git Repository in BitBucket

Pre requisite: A new repository/project should be created on BitBucket

1. Using Git bash, navigate to the folder on your machine where the files are located



2. Initialize 


$ git init

3. Now add the files


$ git add * -f












4. Commit the files with a message


$ git commit -m "Initial commit"

5. Add the remote location

$ git remote add origin https://mad...@bitbucket.org/[new repo].git


6. Before pushing the files to remote, make sure your local is in sync with remote by pull


$ git pull -u origin master







7. Now push the files to to remote

$ git push -u origin master










Hope this helps :)

Exceptional scenarios










Then use the following command


$ git remote set-url origin https://mas.....e@bitbucket.org/m...e/....-dataloader.git

No comments:

 Python Basics How to check the version of Python interpreter mac terminal

Popular in last 30 days