branch

How to clone branch with git-p4?

匿名 (未验证) 提交于 2019-12-03 02:05:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I did: git p4 clone //depot/path/to/project/trunk/@all project to create the master branch of project . Now I want to clone //depot/path/to/project/release to the release branch of project . How is that done? UPDATE: Using --detect-branches doesn't work, either. It reports that it's updating two branches (when there are really three branches) but git branch reports only master exists. 回答1: Here are my setup notes from when I was using git-p4. It might be helpful: Download the p4 linux client . Store the file in ~/bin or /usr/local

Capistrano error tar: This does not look like a tar archive

匿名 (未验证) 提交于 2019-12-03 02:05:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: INFO [050fe961] Running mkdir -p /home/rails/rails- capistrano/releases/20140114234157 on staging-rails DEBUG [050fe961] Command: cd /home/rails/rails-capistrano/repo && ( PATH=/opt/ruby/bin:$PATH GIT_ASKPASS=/bin/echo GIT_SSH=/tmp/rails/git-ssh.sh mkdir -p /home/rails/rails-capistrano/releases/20140114234157 ) INFO [050fe961] Finished in 0.142 seconds with exit status 0 (successful). INFO [2dea2fe5] Running git archive feature/Capistrano | tar -x -C /home/rails/rails-capistrano/releases/20140114234157 on staging-rails DEBUG [2dea2fe5]

fatal: The current branch master has no upstream branch

匿名 (未验证) 提交于 2019-12-03 02:03:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to push one of my projects to github, and I keep getting this error: peeplesoft@jane3:~/846156 (master) $ git push fatal: The current branch master has no upstream branch. To push the current branch and set the remote as upstream, use git push --set-upstream origin master So I tried it and got this: peeplesoft@jane3:~/846156 (master) $ git push --set-upstream origin master fatal: Authentication failed Another stackoverflow thread suggested I try the following, with disappointing results. peeplesoft@jane3:~/846156 (master) $ git

Advice on multiple release lines and git-flow, for git non-gurus

匿名 (未验证) 提交于 2019-12-03 02:03:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Our software product line requires developing and maintaining multiple software versions concurrently. We are relative Git newbies and recently adopted Git Flow to take advantage of Driessen's branching model . We have a very small software team with few dedicated developers (we all wear many hats) and no "integration guru." Much searching has turned up little specific advice on how to adapt Git and Git Flow to our needs. What has turned up is that Git Flow is not well suited to supporting multiple versions concurrently. One related

Remove old remote branches from Git

匿名 (未验证) 提交于 2019-12-03 02:03:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: When I use bash autocompletion in Git, it keeps showing me branches of old remotes that I don't have anymore. When I do a git branch -la it shows those old remotes and branches while a git branch -l won't. A ls .git/refs/remotes/ also shows them. However, they are not present in my .git/config and neither are they shown when I run git remote show . So how do I get rid of them because my autocomplete list is too long right now. I have already tried: git reflog expire -- expire = now -- all git gc -- prune = now rm . git / refs /

Delete last commit in bitbucket

匿名 (未验证) 提交于 2019-12-03 02:03:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I made a mistake and I don't know how to delete my latest push in the repository. I pull the latest updates of the app but it has conflicts and I push it to repository. How to delete my last commit? Or how to fix it? 回答1: In the first place, if you are working with other people on the same code repository, you should not delete a commit since when you force the update on the repository it will leave the local repositories of your coworkers in an illegal state (e.g. if they made commits after the one you deleted, those commits will be invalid

When deleting remote git branch “error: unable to push to unqualified destination”

匿名 (未验证) 提交于 2019-12-03 02:03:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to delete a remote git branch with git push origin :my_remote_branch and getting: error: unable to push to unqualified destination: my_remote_branch The destination refspec neither matches an existing ref on the remote nor begins with refs/, and we are unable to guess a prefix based on the source ref. error: failed to push some refs to 'git@example.com:/myrepo' these are my current branches git branch -a * develop master remotes/origin/HEAD -> origin/master remotes/origin/develop remotes/origin/my_remote_branch git branch -r -

git how to disable push [duplicate]

匿名 (未验证) 提交于 2019-12-03 02:03:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: This question already has an answer here: Git: Set up a fetch-only remote? 4 answers I am using git and I am doing my development work, which I don't want to push, even by mistake. Is there a method to disable push in certain local repository. One method is to rename the branch, another is to undo push if one does it by mistake, but I hope there should be a more direct method. 回答1: The following command will let pulls work, but pushes will try to use the URL no_push and fail: git remote set-url --push origin no_push 回答2: Depending on the

How to fast-forward a branch to head?

匿名 (未验证) 提交于 2019-12-03 02:03:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I switch to master after develop on a branch for a long time. The log shows: Your branch is behind 'origin/master' by 167 commits, and can be fast-forwarded. I tried: git checkout HEAD It has no effect. This is cause because that I have checkout out an intermediate commit on master. How to make master stay on head? 回答1: Doing: git checkout master git pull origin will fetch and merge the origin/master branch (you may just say git pull as origin is the default). 回答2: Try git merge origin/master . If you want to be sure that it only does a fast

.gitattributes & individual merge strategy for a file

匿名 (未验证) 提交于 2019-12-03 02:00:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a master and a test branch of my (web) application. These projects are almost the same, except for one file which sets up the application, say "setup". Whenever I merge one branch into the other, I would like that branch to keep its version of setup. That is, git should not attempt to merge the changes to that file. I followed the guidance from the Pro Git book and created a .gitattributes file, with the line "setup merge=ours". However, this does not work - neither with fast forward merges not if I introduce conflicts. (To be precise