master

git merge: apply changes to code that moved to a different file

匿名 (未验证) 提交于 2019-12-03 01:54:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am attempting a pretty beefy git merge maneuver right now. One problem that I am coming across is that I made some changes to some code in my branch, but my colleague moved that code to a new file in his branch. So when I did git merge my_branch his_branch , git did not notice that the code in the new file was the same as the old, and so none of my changes are there. What's the easiest way to go about applying my changes again to the code in the new files. I won't have too many problems finding out which commits need to be reapplied (I can

Why call git branch --unset-upstream to fixup?

匿名 (未验证) 提交于 2019-12-03 01:54:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm more of a novice when it comes to advanced operations in git. I maintain my blog using the blogging framework Octopress . Though Octopress is not under any development since 2011, it serves my purpose well and so I haven't thought of changing anything so far. FYI, my blog is hosted on Github Pages. Today, while working on a new post, git status showed the following message: On branch source Your branch is based on 'origin/master', but the upstream is gone. (use "git branch --unset-upstream" to fixup) The same message repeated for all the

Git rebase: conflicts keep blocking progress

匿名 (未验证) 提交于 2019-12-03 01:54:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a git branch (called v4), that was made from master just yesterday. There were a couple of changes to master, that I want to get into v4. So, in v4, I tried to do a rebase from master, and one file keeps screwing things up: a one-line text file, that contains the version number. This file is app/views/common/version.txt , which before rebasing contains this text: v1.4-alpha-02 Here's what I'm doing: > git rebase master First, rewinding head to replay your work on top of it... Applying: new version, new branch error: patch failed: app

Git: “Corrupt loose object”

匿名 (未验证) 提交于 2019-12-03 01:52:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Whenever I pull from my remote, I get the following error about compression. When I run the manual compression, I get the same: $ git gc error: Could not read 3813783126d41a3200b35b6681357c213352ab31 fatal: bad tree object 3813783126d41a3200b35b6681357c213352ab31 error: failed to run repack Does anyone know, what to do about that? From cat-file I get this: $ git cat-file -t 3813783126d41a3200b35b6681357c213352ab31 error: unable to find 3813783126d41a3200b35b6681357c213352ab31 fatal: git cat-file 3813783126d41a3200b35b6681357c213352ab31: bad

Show the original branch for a commit

匿名 (未验证) 提交于 2019-12-03 01:52:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I've used git-blame to find a particular commit. Now I want to find the branch that it originally came from. (From there, I'll use the branch name to find the particular ticket) Let's define "original branch" as "the branch to which the commit was made before the branch was merged into any other branch". 回答1: Like the others said, if the branch you are looking for isn't local to the repository on which you are blaming this commit (e.g. a branch only in the personal repo of a distant developer), you are screwed. But assuming that sought-after

Git: refname 'master' is ambiguous

匿名 (未验证) 提交于 2019-12-03 01:52:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I've looked at all of the other ambiguous refname questions and none of them seem to help. Why am I getting this warning? $ git checkout master warning: refname 'master' is ambiguous. $ git show-ref master eef61c00da690f093063ac5a728e22fd21648104 refs/heads/master $ git branch -a checkers exercises * master $ git remote -v $ 回答1: TL;DR: save and delete the tag, as Ashutosh Jindal comments (see " Rename a tag in git? "): git tag tag-master master git tag -d master Original answer: Most of the sources I see (like this FAQ ) point to the same

fatal: bad default revision 'HEAD'

匿名 (未验证) 提交于 2019-12-03 01:52:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm using GIT as my source control system. We have it installed on one of our Linux boxes. Tortoise GIT is my windows client. This morning I checked in some changes, and tagged the code. I then did a push of my local repository to the remote repository. When I go to my repository on the unix box and type in git log I get: fatal: bad default revision 'HEAD' But when I do a show log using my windows tortoiseGit client the history comes up nicely as per below... --- SHA-1: f879573ba3d8e62089b8c673257c928779f71692 Initial drop of code --- master

how to access master page control from content page

匿名 (未验证) 提交于 2019-12-03 01:51:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a master page which contains a label for status messages. I need to set the status text from different .aspx pages. How can this be done from the content page? public partial class Site : System.Web.UI.MasterPage { public string StatusNachricht { get { return lblStatus.Text; } set { lblStatus.Text = value; } } protected void Page_Load(object sender, EventArgs e) { } } I have tried this, but was unsuccessful in making it work: 回答1: In the MasterPage.cs file add the property of Label like this: public string ErrorMessage { get { return

Jenkins Git plugin detached HEAD

匿名 (未验证) 提交于 2019-12-03 01:49:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am new to Git and also to Jenkins. My problem is that I can't get the Jenkins Maven release plugin to work. When I build a common Maven build with Jenkins, it works well, but when I try to perform a release with the Maven release plugin, I get the following stack trace: org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.3.2:prepare (default-cli) on project parent: An error is occurred in the checkin process: Exception while executing SCM command. at org.apache

git push fails: `refusing to update checked out branch: refs/heads/master`

匿名 (未验证) 提交于 2019-12-03 01:49:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I want to store my local modifications to JBoss config in git. For this, I have set up the following structure: lrwxrwxrwx 1 jboss jboss 19 Jan 24 11:53 current -> jboss-as-7.1.0.CR1b drwxr-xr-x 11 jboss jboss 4096 Jan 24 12:13 jboss-as-7.1.0.CR1b -rw-r--r-- 1 jboss jboss 108211143 Jan 23 16:02 jboss-as-7.1.0.CR1b.tar.gz drwxr-xr-x 6 jboss jboss 4096 Jan 24 11:36 local local is the git repository which shall be the "origin". The idea is that I want to be able to easily update my JBoss distribution once an update is available. I want to store