Code Monkey home page Code Monkey logo

coding's Introduction

coding

本地开发分支合并至远程master分支

############# 本地开发分支合并到本地master后,推送到远程master分支################# 在写项目的时候习惯创建一个dev分支用于更新代码,等到整个或者阶段性完成的时候再合并到master上

步骤如下

切换到master分支

git checkout master

将dev分支的代合并到master

git merge dev

查看状态

git status

推送

git push origin maste

远程master分支合并到本地dev分支

######################### 远程master分支合并到本地dev分支#####################

远程master分支的代码领先自己的分支,git 如何把master分支代码合并到自己的分支

1.首先切换到主分支

git checkout master

2.使用git pull 把领先的主分支代码pull下来

git pull

3.切换到自己的分支

git checkout xxx(自己的分支)

4.把主分支的代码merge到自己的分支

git merge master

5.git push推上去ok完成,现在 你自己分支的代码就和主分支的代码一样了

git push origin 自己分支名 ————————————————

本地代码同步至远程git分支

1.本地项目文件夹下执行 git init 2.git add . 3.git commit -m 'test' 4.远程github新建一个同名的仓库 5.将本地与远程仓库连接 git remote add origin [email protected]:michaelliao/learngit.git (如果关联错了则需要 $ git remote rm origin) 6.本地仓库同步至远程 git push -u origin master

新建项目

1.现在github新建一个项目,然后再本地 git clone 项目地址

coding's People

Contributors

tanlangqie avatar

Watchers

 avatar  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.