git基础 - webdancer's Blog
git基础
一、构建git仓库。
有两种取得 Git 项目仓库的方法。第一种是在现存的目录下,通过导入所有文件来创建新的 Git 仓库。第二种是从已有的 Git 仓库克隆出一个新的镜像仓库来。下面尝试第一种方法:
在项目目录下:
git init
二、构建更新到仓库。
1.查看状态:
git status
刚新建的仓库是没有任何文件被跟踪的:
# On branch master # # Initial commit # # Untracked files: # (use "git add <file>..." to include in what will be committed) # # __init__.py # __init__.pyc # apache/ # bookmark_base/ # manage.py # media/ # settings.py # settings.pyc # template/ # urls.py # urls.pyc nothing added to commit but untracked files present (use "git add" to track)
2.跟踪新文件
git add XXX
3.提交
git commit -m ""
三、远程仓库。
git remote add origin git@github.com:username/Hello-World.git git push origin master
文章来源:《pro git》作者:Scott Chacon
2022年8月25日 03:12
Maharashtra Board 12th Model Paper 2023,, Name of the Board MSBSHSE About Maha 12th HSC Model Paper 2023, Maha 12th Blueprint Marathi Hindi English, Class STD 12th Syllabus New Syllabus for General and Vocational Marathi, Hindi, English, Urdu, Mathematics, General Science, Social Science, History, Maha HSC Question Paper 2023 Geography, Civics, Environmental Studies (EVS) Medium, Marathi, Hindi, English & Urdu Medium, Category Maha 12th HSC Model Paper 2023, Maha 12th Blueprint Marathi Hindi English, Academic Year 2023,-2023,, Official Website of Board http://www.balbharati.in/,