How to Upload Local Files to Bitbucket Using Git Bash
This guide walks you through the step-by-step process of uploading files from your local machine to a specific branch in a Bitbucket…
How to Upload Local Files to Bitbucket Using Git Bash
This guide walks you through the step-by-step process of uploading files from your local machine to a specific branch in a Bitbucket repository using Git Bash.

Prerequisites
Before starting, make sure you have:
- Git installed on your system. If not, click here.
- Access to the Bitbucket repository
- The repository SSH/HTTPS URL
- Your project files saved in a local folder
Step 1: Open Your Project Folder in Git Bash
First, place all the files you want to upload inside a folder.
Then:
- Navigate to that folder in your file explorer.
- Right-click inside the folder.
- Select Git Bash Here.
This opens a Git terminal directly in that directory.

Step 2: Initialize a Git Repository
Run the following command to initialize Git in your folder.
git init
This creates a hidden .git directory that allows Git to track changes in your project.
Step 3: Connect to the Remote Bitbucket Repository
Next, link your local repository to the remote Bitbucket repository. You can find the link in the clone button inside your repository. Generally, an HTTPS link is preferred over an SSH one.
git remote add origin https://##############
Here:
originis the name given to the remote repository- The URL points to your Bitbucket project
Step 4: Check File Status
Before uploading, check which files Git sees in your project.
git status
This command shows:
- Untracked files
- Modified files
- Files ready to commit
Step 5: Fetch Repository Information
Now fetch the latest information from the remote repository.
git fetch origin
This downloads branch information without modifying your local files.
Step 6: Switch to the Target Branch
By default, Git starts on the master or main branch. If your files should go to a different branch, switch to it.
git checkout -b YOUR-LOCAL-BRANCH YOUR-TARGET-BRANCH
This command:
- Creates a local branch
- Links it to your remote branch
For example, your remote branch is xyz then the command would look like:
git checkout -b xyz origin/xyz
Step 7: Add Files to Git
Now stage all files for upload.
git add .
The . means add everything in the current folder.
Step 8: Commit the Files
Next, commit the staged files with a message describing the change.
git commit -m "Added notebook files"
A commit acts like a snapshot of your project at that moment.
Step 9: Push Files to Bitbucket
Finally, upload your files to the remote repository.
git push
Your files will now be available in your target branch of the Bitbucket repository.
메타데이터
- post_id
- aef27a7d330b
- slug
- how-to-upload-local-files-to-bitbucket-using-git-bash-aef27a7d330b
- url
- https://medium.com/@k13anchi/how-to-upload-local-files-to-bitbucket-using-git-bash-aef27a7d330b
- canonical_url
- https://medium.com/@k13anchi/how-to-upload-local-files-to-bitbucket-using-git-bash-aef27a7d330b
- author_url
- https://medium.com/@k13anchi
- status
- ok
- fetched_at
- 2026-07-09 05:26:43