branch

Why is it resulting in a merge conflict?

匿名 (未验证) 提交于 2019-12-03 02:59:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: This was the initial snapshot of my git repository On branch master , file m1 contains L1 On branch dev , file m1 contains L1 L2 If I try to merge dev from master , it results in a conflict. $ git checkout master Switched to branch 'master' $ git merge dev Auto-merging m1 CONFLICT (content): Merge conflict in m1 Automatic merge failed; fix conflicts and then commit the result. $ git diff diff --cc m1 index 078f94b,9f46047..0000000 --- a/m1 +++ b/m1 @@@ -1,1 -1,2 +1,5 @@@ L1 ++<<<<<<< HEAD ++======= + L2 ++>>>>>>> dev Though I didn't modify

Git Switching branch

五迷三道 提交于 2019-12-03 02:59:01
There is somthing I don't get yet with git. It is branch. So let say that I have a local repository A which I clone from a remote one B . So now A have the master branch checked out. So when I push from A it goes to B master. B is just a clone on github, a clone of C . From time to time in other to get in sync I pull from C master branch. But now C master branch is quite broken for the time being. Since from A I had pull from C my local A is also bugy. So I would like from A to pull the C stable branch. How do you guys usually do in this situation? Do you create a new branch on A and pull from

git pull --rebase

匿名 (未验证) 提交于 2019-12-03 02:56:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Start situation (no unpushed changes, > indicates the current branch): o C [> master][origin/master] | o B | o A | ... After a git fetch the log structure often looks like o E [origin/master] | o C' | o B' | o D | | o C [>master] | | | o B |/ o A | ... Now git rebase origin/master master often produces conflicts. Is git pull --rebase smarter and just uses git reset to make master also point to E if master == origin/master initially? 回答1: git pull --rebase its similar to what: git fetch git rebase would do. So in your case will leave the repo

In Git, list names of branches with unpushed commits

匿名 (未验证) 提交于 2019-12-03 02:56:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: Given a project with several local branches, each tracking some remote branch, is there a command that lists all branches that have unpushed commits? (That is, even if none of those branches are checked out.) I don't want to see the commits themselves, nor do I want to see branches that are up-to-date, I just want to see which branches are ahead of their remotes. I have tried git log --branches --not --remotes --simplify-by-decoration --decorate --oneline , but it doesn't seem to show what I need. Running it on my current repo

Mercurial branching and bookmarks

烂漫一生 提交于 2019-12-03 02:55:11
问题 I read some information about named branches and working with bookmarks. Unfortunately I still don't see a difference between them. Is there any? Is there any difference between: hg branch blah hg up blah and hg bookmark blah hg up blah ? Why would I use a bookmark and how is it different from a named branch? 回答1: Bookmarks are tags that move forward automatically to subsequent changes, leaving no mark on the changesets that previously had that bookmark pointing toward them. Named branches,

Angular 4 - “tree.branch is not a function” when trying to start a new project

匿名 (未验证) 提交于 2019-12-03 02:54:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: When I run ng new testApp I get this error Error: tree.branch is not a function tree.branch is not a function My node version is 6.11.4 My angular/cli version is 1.4.5 My os is win32 x64 I'm trying to get angular to work on my work PC. No idea what i'm doing wrong. Help 回答1: Remove the node_modules folder from your $HOME directory cd $HOME rm -rf node_modules For some reason the node_modules folder was in the $HOME directory and ng CLI was using it. 回答2: I had the same issue with npm 5.5.1 node 8.8.1 and angular cli 1.4.9 (latest from

Is it possible to disable do “push force”, which overwrite “master” trunk of repository?

匿名 (未验证) 提交于 2019-12-03 02:54:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: For the trunk "master" I can do "git reset hard" to an earlier commit and then "git push force", to rewrite it in the repository. And I lose part of the development, after this commit. But if for some branches it is not so critical, then for the trunk "master" is very critical. Is it possible to disable do "push force", which overwrite "master" trunk of repository, and how can I switch off it? 回答1: The only way to disable force push on a per branch basis that I've ever come across is with a pre-receive hook as shown at https:/

maintaining configuration differences between dev and live environments during deployment from SVN

匿名 (未验证) 提交于 2019-12-03 02:52:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: We use the ExpressionEngine CMS (php) to create websites. For each site, we set up a subversion repository and commit the EE installation as well as any custom templates, images, javascript, etc. that are used. Included in the repository is the file containing all of the environment variables and the .htaccess file. We have a development server with a working copy of the repository updated via post-commit that we use to develop. When we are ready to release we create a branch in subversion, make any changes required for the production

Running tests on feature branches

匿名 (未验证) 提交于 2019-12-03 02:52:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a build configuration with a test VCS root that connects to git branch dev , 3 build steps and 1 trigger. These are my build steps: Build tests Run tests Build & Deploy I would like to run all of these build steps for branch dev but only two of them (build and run tests) for branches matching feature/* . I want this to be displayed under my build configuration. So the build configuration has a default dev branch that runs tests and deploys, but the feature/* additional branches only run tests. How can I achieve this? If I add /refs

How can I make a Pull request using TortoiseGit

匿名 (未验证) 提交于 2019-12-03 02:52:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: In TortoiseGit When I hit Right Click -> Push, OK, Give it User/Pass then after that there is a Create Pull request button giving it a Start, URL, End. I am clicking, but nothing happens. The Pull requests (0) is shown in my repo. And one other thing, How can I make a pull request and then update it as necessary using the same software (TortoiseGit) 回答1: The doc mentions : After pushing your changes to a (public) repository, you just provide other people the URL of your repository and the name of the branch or the revision id. E.g.: git:/