Git Product home page Git Product logo

git's Introduction

git for mac

what we need to do is just install a tool named Command Line Tools

//open the terminal,and type
xcode-select --install enter
//test 
gcc -v
//if it shows below message, then it's installed.
xcode-select: note: install requested for command line developer tools
apple-1tekiiMac:~ apple-1$ gcc -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 6.1.0 (clang-602.0.49) (based on LLVM 3.6.0svn)
Target: x86_64-apple-darwin14.3.0
Thread model: posix

ssh key

$ ssh-keygen -t rsa -C "[email protected]"
ssh -T [email protected]
ssh -T [email protected]

need pwd to access

git add .
git status
git commit -m ''
git push //if it fails to push, we need to use git pull adn add some message for it
enter your uname
enter your pwd
...
Ok

config

add id_rsa.pub into vps 首先配置自己的身份,这样在提交代码的时候就能知道是谁提交的

输入git config --global user.name "名字"
git config --global user.email "邮箱地址"
输入git init就可以创建啦~
然后使用ls -al查询代码仓库,如果想删除这个仓库,直接从目录下删除这个文件夹就可以了
仓库建立完成之后就可以提交本地代码了,这里只需要用到两个命令,add添加和commit提交
add .是提交所有
add +文件名是提交单个文件
git commit -m "First commit"是提交这里要在-m参数后面加上提交参数,很重要哟,不然会被认为不合法不能提交.

git's People

Contributors

cortney-x avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.