git-branch

How can I override the <default> branch name in TeamCity 7.1 using Git branching support?

北城余情 提交于 2019-12-04 16:05:30
问题 I've got a CI build pulling feature branches from Github and building/packaging them into a local folder, using a folder naming convention based on the project, branch and build number. For named branches (feature1, feature2) this is working great. The problem is that when I do a commit to the master, TeamCity exposes teamcity.build.branch as <default> - which means when the build step expands E:\Packages\MyProject\%teamcity.build.branch%\ it's ending up with E:\Packages\MyProject\<default> -

How to git svn fetch only branches/tags with certain patterns?

我的梦境 提交于 2019-12-04 15:43:15
I want to check out Boost library using git-svn, and I only want to checkout trunk and tags starting from version 1.35, i.e. tags/release/Boost_1_35 and up. My config looks like this: [svn-remote "svn"] ignore-paths = ^tags/release/(?i:(?!boost)|[^/]*(?:beta|rc)|boost_(?:0|1_[1-2]|1_3[0-4]))[^/]*/ url = https://svn.boost.org/svn/boost fetch = trunk:refs/remotes/svn/trunk tags = tags/release/*:refs/remotes/svn/tags/* However, git fetch still fetches tons of unrelated tags such as svn/tags/version_0-9-10 or svn/tags/version_0-9-10@44215. I wonder what's the correct way of specifying ignore-paths

Cleaning remote Git branches

不问归期 提交于 2019-12-04 15:40:21
I have moved an SVN repo to Git and probably due to a number of clonings, I'm now left with a bunch of branches that look like BranchA origin/BranchA remotes/BranchA remotes/origin/BranchA remotes/origin/origin/BranchA i.e. the same branch is listed a number of times. How can I clean this mess up. There are > 50 branches, some are not needed at all, and for the rest I'd be happy with just having them once. EDIT: This is what git remote show origin looks like for a certain case: Remote branches: BranchA tracked origin/BranchA tracked ... Local branches configured for 'git pull': origin/BranchA

Forgot to branch in git, need to move changes from master [duplicate]

拜拜、爱过 提交于 2019-12-04 15:27:41
问题 This question already has answers here : Move existing, uncommitted work to a new branch in Git (8 answers) Closed 5 years ago . I eagerly ducked into code mode and modified some files, but neglected to branch from master first. The mods aren't so extensive that I can't redo them, but what's a good way of taking my (so far, uncommitted) changes in master and migrating them to a new branch, leaving master untouched in the end? 回答1: If not yet committed anywhere ( git status shows a bunch of

opening .git/config : Permission denied

百般思念 提交于 2019-12-04 12:28:48
问题 C:\Users\Inspiron\.git\config folder is empty and command $git config user.email user@gmail.com returns error: opening .git/config: permission denied. I try to set post buffer size,but get same error. 回答1: Thats not a folder its the main configuration file for git. Here you can see the files for configuration http://git-scm.com/docs/git-config Permission denied under windows its a bit strange. Check the permissions of the file. Perhaps you have removed the Permissions in the extended

git branch workflow policy

微笑、不失礼 提交于 2019-12-04 11:54:00
I am new to git and understand a little bit about Git. My company is currently have 1 program and the program divides into 5 products. each product is handling by different team. Currently my company git have 5 branches such as : dev = this branch is for developer to build program (dev.program.com) test(alpha) = this branch is for tester to test the program (test.program.com) staging(beta) = this branch is for tester test the program (double check of error ) and client test the program. (stg.program.com) staging-trx = the duplicate of staging and for developer to make sure that no error

How to update a file across all branches in a Git repository

无人久伴 提交于 2019-12-04 11:39:39
问题 In the case that a a repository has a number of branches: How does one simply update a file across all the branches. In this case it's a bashrc like file that specifies some environments variables. I have in the past updated the master branch version then rebased each branch. This has a sort of n+1 overhead, I'd like to avoid. 回答1: I think, it is bit late but following script will help you in this. #!/bin/bash if [ $# != 1 ]; then echo "usage: $0 <filename>" exit; fi branches=`git for-each

Git branch structure for Client & Server

南楼画角 提交于 2019-12-04 11:34:17
For one of my CS classes, I and a group are writing an application using a client/server architecture. I was curious what the best-practices would be for organizing the project in a Git repository. What I mean, is whether we should structure the directories like this: ProjectDir/ Clients/ Client1/ # files... Client2/ # files... Server/ files.... and track everything on the same git branch, or whether we should create separate branches for the clients and the server, like: on branch Server : Project/ Server/ # files... on branch Clients : Project/ Client1/ # files... Client2/ # files... I don't

What happens in the child branch if I delete a parent branch in git

不羁的心 提交于 2019-12-04 10:19:01
问题 I am planning to rename a branch in my git repository. I found out that the easy way to do that is to make a new branch from that branch and give it the desired name. After that I want to delete the old branch (the parent). But I'm afraid that I will lose data in my new branch if I do that. What happens with the commits originally made to the parent branch if I delete that branch? 回答1: What happens? nothing. If you create a branch where another is, you can "delete" that other branch without

Move branch to another branch

寵の児 提交于 2019-12-04 08:56:21
问题 I have started doing some work on a branch which I have in term realised was the wrong branch. Is there a way to move a branch to a different branch. For example: A -- B -- C -- D -- HEAD \-- E -- F -- G -- H -- I -- J \-- K -- L And I want this: A -- B -- C -- D -- HEAD \ \-- K -- L \ \-- E -- F -- G -- H -- I -- J 回答1: Let's say you've named your branches like so: A -- B -- C -- D (master) \-- E -- G -- H -- I -- J (current-parent) \-- K -- L (my-branch) What you want to do is rebase my