zoukankan      html  css  js  c++  java
  • git常用命令

    git push origin :<branchName>   推送并删除远程自己提交的分支

    初始化key
    ssh-keygen -t rsa
    git init
    git status


    ssh-keygen -t rsa -C "75xx99404@qq.com"
    $ ssh -T git@git.oschina.net
    Enter passphrase for key '/c/Users/jinxxxng/.ssh/id_rsa':
    Welcome to Git@OSC, huaxxxxng!


    git clone git@192.168.0.251:server_develop/server-app.git 克隆工程到本地
    git pull origin pre-release-20160811 拉取更新目录下来

    git branch
    git branch -a
    git branch bugfix-memo-0809    创建分支
    git branch -d bugfix-memo-0809 删除分支
    同时创建并切换分支
    >git checkout -b newBranch 160810添加~~

    git checkout bugfix-memo-0809   切换分支
    git add .                                    添加分支
    git commit -m "提交备注" git commit -am "My feature is ready"   提交分支

    git push origin bugfix-momo-0809   推送分支到远程
    git push origin bugfix-memo-0809

    git log -1 //git log 会有很多的log            log记录
    git show 4a6cd6e85d348afe5c99dc25a9bc3703dfaf639c     log备注

    git config --list           全局配置
    git config --global push.default simple
    git config --global user.name "jinxxang"
    git config --global user.email "jinxxang@axxhe.cn"
    git config --global credential.helper store    加上去之后还是每次需要输入密码,貌似效果不佳。


    提交合并有问题?? 思路:pre-release往本地分支上面合并,本地分支合并好了之后再往远程上面推送本地分支,然后再提交合并请求。
    $ git merge bugfix-memo-0809
    error: cannot stat 'esc': Permission denied

  • 相关阅读:
    [LeetCode] Min Stack
    [LeetCode] Find Minimum in Rotated Sorted Array
    [LeetCode] Maximum Product Subarray
    [Jobdu] 题目1504:把数组排成最小的数
    [Jobdu] 题目1544:数字序列区间最小值
    Python2.3-原理之语句和语法
    Python2.5-原理之模块
    Vim2.1-Vim简明教程【CoolShell】【非原创】
    Python2.6-原理之类和oop(下)
    QT1.1-与Opencv的hello world
  • 原文地址:https://www.cnblogs.com/simpledev/p/5829750.html
Copyright © 2011-2022 走看看