[英]Git queries - Git push, pull and commit. Bitbucket
I've created a project repository in my Bitbucket. 我在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. 提前致谢。
Clone your directory first on your desired target from GitHub 首先从GitHub将目录克隆到所需的目标上
like git clone https://github.com/foldername/project.git
像
git clone https://github.com/foldername/project.git
a folder will be created 将创建一个文件夹
cd foldername cd文件夹名称
git pull origin master
in your folder name 在您的文件夹名称中使用
git pull origin master
if you changed anything in your git project file 如果您更改了git项目文件中的任何内容
you can view the changed files by 您可以通过以下方式查看更改的文件
git status
add those file to git like 像添加那些文件到git
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 然后将您的更改推送到master分支
git push origin master
note: if you want to create a branch from your master after cloning the git hub directory
注意:如果要在克隆git hub目录后从主节点创建分支
use git checkout -b yourbranchname
使用
git checkout -b yourbranchname
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. 这将在Bitbucket上创建您的存储库到本地路径的副本。 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. 完成更改后,运行
git add
命令将文件添加到暂存区域。 Then you can create a commit with git commit -m "commit message"
然后,您可以使用
git commit -m "commit message"
创建一个提交
git pull origin master
is to get updates from the remote repository's master branch to your local git pull origin master
是从远程存储库的master分支到本地的更新
git commit -m "new-commit"
is to create a commit with your changes which are already staged. git commit -m "new-commit"
用于使用已经进行的更改创建一个提交。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.