Code Monkey home page Code Monkey logo

gitbasicoperation's Introduction

Command Line Instructions

Ⅰ.SSH keys
ssh-keygen -t rsa -C [email protected]
open C:\Users\xxx\.ssh\id_rsa.pub
copy the content and paste to the server places

Ⅱ.Git global setup
git config --global user.name "SenZerZheng"
git config --global user.email [email protected]

(Ⅰ)Create a new repository
git clone [email protected]:SenZerZheng/Hello.git
cd Hello
touch README.md
git add README.md
git commit -m "add README"
git push -u origin master

(Ⅱ)Existing folder or Git repository
cd existing_folder
git init
git remote add origin [email protected]:SenZerZheng/Hello.git
git add .
git commit
git push -u origin master

Ⅲ.Merge
(Ⅰ)Merge from branch(develop) to trunk(master)
git checkout master
git merge develop // merge from develop to master, the current code is master
github
start . // explore the app
or start app/.../network/HelloUrl // explore the HelloUrl.java
image

Explain Image: "<<< HEAD to ===": server version; === to >>> dev: local version. It depends on you!
image
Explain Image: result
image
git commit –a / git commit
image
git push // push the remote

(Ⅱ)Merge from Hello.java to Hello.java in develop
git status
git add .
git status
git commit –a / git commit
git pull
start . / start app/.../network/HelloUrl

Explain Image: "<<< HEAD to ===": server version; === to >>> dev: local version. It depends on you!
image
Explain Image: result
image
git commit –a / git commit
git push // push the remote

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.