TheQ
TheQ

Reputation: 2009

How to do first bitbucket commit?

So I'm very new to bitBucket. And I'm hoping for a very step wise simple answer.

  1. I have a folder with all my code/project files.

  2. I have a repository set up.

Now, how do I connect the two ? I'm looking online but everyone is showing different steps. I haven't written any command lines. What are the command lines from the beginning to the end for the my first initial push ?

Upvotes: 5

Views: 25561

Answers (3)

Keshav Gera
Keshav Gera

Reputation: 11244

E:\ReactAll\RealmDemo\ez-react-pocs>git add --all

E:\ReactAll\RealmDemo\ez-react-pocs>git commit -m 'Realm_Demo'

E:\ReactAll\RealmDemo\ez-react-pocs>git push

Again after modified

E:\ReactAll\RealmDemo\ez-react-pocs>git add --all
E:\ReactAll\RealmDemo\ez-react-pocs>git status
On branch master
Your branch is up to date with 'origin/master'.

Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)

        modified:   SqliteDemo/Database.js
        modified:   SqliteDemo/src/ProductAddScreen.js
        modified:   SqliteDemo/src/ProductScreen.js


E:\ReactAll\RealmDemo\ez-react-pocs>git commit -m "Sqlite Demo updated"

E:\ReactAll\RealmDemo\ez-react-pocs>git pull
Already up to date.

E:\ReactAll\RealmDemo\ez-react-pocs>git push
Enumerating objects: 13, done.
Counting objects: 100% (13/13), done.
Delta compression using up to 12 threads
Compressing objects: 100% (7/7), done.
Writing objects: 100% (7/7), 1.54 KiB | 1.54 MiB/s, done.
Total 7 (delta 6), reused 0 (delta 0)
remote: Checking connectivity: 7, done.
To https://bitbucket.org/develop-eeziklik/ez-react-pocs.git
   0cea991..ae349a3  master -> master

E:\ReactAll\RealmDemo\ez-react-pocs>

Note :- git commit krne ke pad push leena hai and after that Push Krna hai

Upvotes: -1

Keshav Gera
Keshav Gera

Reputation: 11244

open GitBash and set Project Location Path

git init
git add --all
git commit -m "Initial Commit"
git remote add origin ORIGIN_URL 
git push -u origin master

URL link this https://[email protected]/keshavgera/ProjectName.git

enter image description here

Upvotes: 12

zachi
zachi

Reputation: 432

Please go through this

https://confluence.atlassian.com/bitbucket/add-unversioned-code-to-a-repository-877177133.html

Here it is clearly described how to add your code/project from your local machine to git repo.

enter image description here

Hope this helps!

Upvotes: 3

Related Questions