git_usage's Introduction
1. mkdir somename #创建工作目录 2. cd somename && git init #Init 目录,生成.init目录即本地仓库 3. vi xx.file # 创建编辑文件 4. git add * # 把该目录下的文件 或者修改过的文件 添加到.init本地仓库的index缓存区 5. git commit -m "anntation of this modify of file" #记录该目录下的文件的修改到本地仓库.init 6. git remote add git_usage_or_some https://github.com/orangeSi/somename.git #在github上创建仓库命名为somename,然后执行remote来把该仓库添加到git_usage_or_some,做这个名字和somename都是唯一的,这样才能通过git_usage_or_some找到somename这个仓库 6. git_usage_or_some 是本地仓库的名字也是远端仓库的别名,somename是github上云端仓库的名字,通过remote add 把两者联系alias在一起 6. 如果远端仓库改了文件,本地仓库在push的时候,首先得git pull git_usage_or_name master把远端仓库的master分支下的下载下来,然后在push 7. git push git_usage_or_some master #把commit 本地仓库git_usage_or_some_name 中记录的改变的文件推送到云端仓库somename.git 7. git_usage_or_some 和master都可以用tab补全~ 8. ~~~每次修改文件都要对应的文件add + commit + push才能把本地修改后的推送到远端仓库~~~ 9. .git目录记录了index缓存区和commit的修改记录和远端仓库的地址和名字 10. git config --global credential.helper 'cache --timeout=3600' #延长再次输入密码的时间,这样就不用每次push都要输入账号密码了
git_usage's People
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.