How to config Git remote server on Bitbucket or Github

For your first push with git, you may get following errors when you use github or bitbucket. $ git push No refs in common and none specified; doing nothing. Perhaps you should specify a branch such as ‘master’. fatal: The remote end hung up unexpectedly Everything up-to-date Just run following command to set your remote […]

How to keep master thesis safety and availability on Windows

When you write your master thesis (in Chinese) on windows, you may have following worries. a, Be afraid your master thesis is lost (or can not be accessed) when hard disk/udisk is broken (or something other viruses). b, Keep master thesis availability (7×24) and safety. c, Do not want anyone else to access it before […]

Git-email cannot send email

As is known, git-send-email is easy to send patches to upstreams. However, now, I happen to following questions. How to solve it??? $ sudo git send-email –from=lgb.nwpu@gmail.com –to=ganeti-devel@googlegroups.com –in-reply-to=lgb.nwpu@gmail.com –subject=”[PATCH stable-2.10] Fix typos in doc/design-file-based-storage.rst” –smtp-server=/usr/bin/msmtp ./0001-fix-typos-in-design-file-based-storage.rst-doc.patch ./0001-fix-typos-in-design-file-based-storage.rst-doc.patch (mbox) Adding cc: Gangbiao Liu lgb.nwpu@gmail.com from line ‘From: Gangbiao Liu lgb.nwpu@gmail.com‘ From: lgb.nwpu@gmail.com To: ganeti-devel@googlegroups.com Cc: […]

What about the master branch for local git configuration in a git repository to make it track remote master branch?

What about the master branch for local git configuration in a git repository to make it track remote master branch? You may append these lines to .git/config in your cloned repository directory: [branch “master”] remote = origin merge = refs/heads/master Answered by Eric Z Ma.

How to merge git branches quickly and correctly

Suppose I have following branches harryxiyou@common_vm ~/forest/sqle/sqle/scripts $ git branch * dev-harry master rc After I did some changes on dev-harry branch, I wanted to merge dev-harry into rc branch. 1, git checkout rc 2, git merge dev-harry References:http://stackoverflow.com/questions/24147169/merge-two-remote-branches-in-githttps://www.atlassian.com/git/tutorials/using-brancheshttp://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging Answered by harryxiyou. I usually add –no-ff during git merge to force git to add a […]

how to pull your git tree after creating it on remote server

Currently, I have created my branch dev-harry but I cannot pull it successfully as follows. harryxiyou@common_vm ~/forest/kvplus/kvplus $ git branch * dev-harry master rc harryxiyou@common_vm ~/forest/kvplus/kvplus $ git pull You asked me to pull without telling me which branch you want to merge with, and ‘branch.dev-harry.merge’ in your configuration file does not tell me, either. […]

How to clone a snapshot of a remote repository at a specific branch?

I know that one can make a zip of the current branch by: git archive -o archive.zip HEAD However, at situations, one may want to clone a copy/snapshot of remote repository at a specific branch because: 1) The repository is large with long history and cloning the whole history takes too much time. 2) What […]

How to import a googlecode git project to github project

I wanna migrate leveldb (code.google.com/p/leveldb) to my github repository. Create a new repo on github.com with this link https://help.github.com/articles/creating-a-new-repository git clone https://code.google.com/p/ project-name.git Set the remote origin url as follows: git remote set-url origin https://github.com/ username/ repo-name.git git pull to pull the latest. git push origin master after making local changes. This is the original […]