Git Commands Notes

Push

Push changes to remote. (If the remote doesn‘t have the branch, the branch will be created)

git push <remote name> <branch name>

Renaming a branch (a complete version of push command)

This can delete a  remote branch by providing empty local branch name.

git push <remote name> <local branch name>:<remote branch name>

References:

https://help.github.com/articles/pushing-to-a-remote/

http://stackoverflow.com/questions/2765421/push-a-new-local-branch-to-a-remote-git-repository-and-track-it-too

时间: 2024-08-25 19:27:57

Git Commands Notes的相关文章

MichaelBoselowitz/pygit2-examples: Examples of some "porcelain" git commands implemented with python bindings (pygit2) to the libgit2 library.

MichaelBoselowitz/pygit2-examples: Examples of some "porcelain" git commands implemented with python bindings (pygit2) to the libgit2 library.

[label][git-commands] Several Git Commands

The process of Git commands Operation 1. git commit -m 'fist post' Windows PowerShellCopyright (C) 2009 Microsoft Corporation. All rights reserved. C:\Users\james> cd f:/F:\> cd kamakawiwoF:\kamakawiwo> dirF:\kamakawiwo> git initInitialized em

Git - The most common git commands in the day-to-day work

We use git commands in the day to day work, below are the most common git commands I could think of. Create a new branch git branch <branchName> Switch to the new branch git checkout <branchName> Create a new branch and switch to it git checko

Git Commands

当然,首先要先安装Git 安装命令:sudo apt-get install git 我在github上有个仓库,https://github.com/sunjieee/Homepage,那我们把它git到本地. 通过命令:git clone 如上图:远程仓库已经被clone到本地的-/Homepage中 这里我用的是ssh,当然也可以通过https,而https是需要输入用户名.密码,不太方便,但ssh第一次需要设置一下ssh key 设置可以按官方教程来,网址:https://help.gi

Git learning notes

推荐文档:http://www.liaoxuefeng.com/wiki/0013739516305929606dd18361248578c67b8067c8c017b000/ 接触git两天,感觉很强大很方便,记录下一些学习笔记. 工作区 -> git add -> 暂存区 -> git commit -> 版本库 -> git push -> 远程仓库 版本库HEAD表示当前版本,上一个版本HEAD^,上上一个版本HEAD^^....... git config -

Useful Git Commands for me

查看Git追踪的文件 git ls-files 移除远程仓库的文件夹 git rm -r --cached some-directory git commit -m "Remove the now ignored directory some-directory" git push origin master 更新gitignore文件 git rm -r --cached . git add -A git commit -m "update .gitignore"

linux commands notes

fsck -y mtr IP cat/tac runlevel/tty eject /eject -t 开/关 mount -o loop *.iso /mnt --bind /root /mnt -t tmpfs tmpfs /mnt uniq -u -c -d -s 跳过 -w 计算在内 export var / -f funcname dd if= of= bs=1k count=1024 w /who /finger lspci/lsusb -v od -xa / hexdump -C

Very Good Article on How Git Commands Work

http://stackoverflow.com/questions/30038999/differences-between-commit-commit-and-push-commit-and-sync

Git for Windows v2.11.0 Release Notes

homepage faq contribute bugs questions Git for Windows v2.11.0 Release Notes Latest update: December 1st 2016 Introduction These release notes describe issues specific to the Git for Windows release. The release notes covering the history of the core