Skip to content

SenzerZheng/GitBasicOperation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 

Repository files navigation

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

About

Git Basic Operation(SSH & INIT & MERGE)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors