version-control

ClearCase advantages/disadvantages [closed]

这一生的挚爱 提交于 2019-12-17 02:28:16
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . Locked . This question and its answers are locked because the question is off-topic but has historical significance. It is not

How can I track system-specific config files in a repo/project?

回眸只為那壹抹淺笑 提交于 2019-12-17 02:23:16
问题 I have a ruby project, and the database host and port might be different on dev and production. I need a way to get different values for those into my scripts for the two environments. The project should be complete - so there should be some way to specify default values. I don't want a clone to be missing the config files. So ignoring them completely won't work. How do you solve this problem with git? 回答1: I would recommend using: a template config file (a file with variable name in place of

What is the difference between “git init” and “git init --bare”?

家住魔仙堡 提交于 2019-12-17 01:35:46
问题 What is the different between git init and git init --bare ? I found that a lot of blog post requires --bare for their Git server? From the man page, it said: --bare Create a bare repository. If GIT_DIR environment is not set, it is set to the current working directory But what does it actually mean? Is it required to have --bare for the Git server setup? 回答1: Non-Bare Git Repo This variant creates a repository with a working directory so you can actually work ( git clone ). After creating it

Using IPython notebooks under version control

梦想与她 提交于 2019-12-17 01:14:30
问题 What is a good strategy for keeping IPython notebooks under version control? The notebook format is quite amenable for version control: if one wants to version control the notebook and the outputs then this works quite well. The annoyance comes when one wants only to version control the input, excluding the cell outputs (aka. "build products") which can be large binary blobs, especially for movies and plots. In particular, I am trying to find a good workflow that: allows me to choose between

Vendor Branches in Git

北城余情 提交于 2019-12-17 01:02:14
问题 A Git project has within it a second project whose content is being worked on independently. Submodules cannot be used for the smaller, as even the subproject must be included when users attempt to clone or download the 'parent'. Subtree-merging cannot be used, as the subproject is being actively developed, and subtree merging makes it very difficult to merge those updates back into the original project. I have been informed that the solution is known in the SVN world as "Vendor Branches",

What is a tracking branch?

旧时模样 提交于 2019-12-17 00:26:36
问题 Can someone explain a "tracking branch" as it applies to git? Here's the definition from git-scm.com: A 'tracking branch' in Git is a local branch that is connected to a remote branch. When you push and pull on that branch, it automatically pushes and pulls to the remote branch that it is connected with. Use this if you always pull from the same upstream branch into the new branch, and if you don't want to use "git pull" explicitly. Unfortunately, being new to git and coming from SVN, that

I ran into a merge conflict. How can I abort the merge?

雨燕双飞 提交于 2019-12-16 22:23:18
问题 I used git pull and had a merge conflict: unmerged: _widget.html.erb You are in the middle of a conflicted merge. I know that the other version of the file is good and that mine is bad so all my changes should be abandoned. How can I do this? 回答1: Since your pull was unsuccessful then HEAD (not HEAD^ ) is the last "valid" commit on your branch: git reset --hard HEAD The other piece you want is to let their changes over-ride your changes. Older versions of git allowed you to use the "theirs"

Git and Mercurial - Compare and Contrast

久未见 提交于 2019-12-16 22:21:10
问题 For a while now I've been using subversion for my personal projects. More and more I keep hearing great things about Git and Mercurial, and DVCS in general. I'd like to give the whole DVCS thing a whirl, but I'm not too familiar with either option. What are some of the differences between Mercurial and Git? Note: I'm not trying to find out which one is "best" or even which one I should start with. I'm mainly looking for key areas where they are similar, and where they are different, because I

I ran into a merge conflict. How can I abort the merge?

不羁岁月 提交于 2019-12-16 22:20:43
问题 I used git pull and had a merge conflict: unmerged: _widget.html.erb You are in the middle of a conflicted merge. I know that the other version of the file is good and that mine is bad so all my changes should be abandoned. How can I do this? 回答1: Since your pull was unsuccessful then HEAD (not HEAD^ ) is the last "valid" commit on your branch: git reset --hard HEAD The other piece you want is to let their changes over-ride your changes. Older versions of git allowed you to use the "theirs"

What does “Git push non-fast-forward updates were rejected” mean?

前提是你 提交于 2019-12-16 20:56:55
问题 I'm using Git to manage my two computers and my development. I'm trying to commit changes to GitHub and I'm getting the error. Failed to push some refs to <repo> . To prevent you from losing history, non-fast-forward updates were rejected. Merge remote changes before pushing again. What could be causing this and how can I fix this? EDIT: Pulling the repo returns the following: *branch master->master (non-fast-forward) Already-up-to-date Pushing still gives me the aforementioned error. 回答1: