Vishnu Nair
Vishnu Nair

Reputation: 265

Git queries - Git push, pull and commit. Bitbucket

I've created a project repository in my Bitbucket.

I did the following,

git pull origin master

git commit -m "new-commit"

But the folder is not created in my local path.

Can anyone give step by step idea for this.?

Thanks in advance.

Upvotes: 0

Views: 397

Answers (2)

Hrishikesh Kale
Hrishikesh Kale

Reputation: 6568

Clone your directory first on your desired target from GitHub

like git clone https://github.com/foldername/project.git

a folder will be created

cd foldername

git pull origin master in your folder name

if you changed anything in your git project file

you can view the changed files by

git status

add those file to git like

git add filename1 filename2 filname3

then commit your files with an appropriate message like

git commit -m "my changes"

and then push your changes to the master branch

git push origin master

note: if you want to create a branch from your master after cloning the git hub directory

use git checkout -b yourbranchname

Upvotes: 2

Madhu Bhat
Madhu Bhat

Reputation: 15223

You would first need to clone the remote repository to your local with the below command.

git clone https://git/url.git

That would create a copy of your repository on Bitbucket to your local path. You can then move into the folder and make your changes to the files. Once you are done with the changes, run the git add command to add files to the staging area. Then you can create a commit with git commit -m "commit message"

git pull origin master is to get updates from the remote repository's master branch to your local

git commit -m "new-commit" is to create a commit with your changes which are already staged.

Upvotes: 0

Related Questions