git

Is SSH public key need to be the same each time I do push/pull with git repository?

I am just started using Git, so I apologize if it is a newbie question. I am using two different machines to commit changes to remote Git repository on github.com. Do I need to use the same SSH public key (the one I mentioned for my repository on Github)? ...

what should be in .gitignore file for a netbeans java project?

What should be the content of the .gitignore file for a java project in netbeans? ...

How to best work with a "forked" a git repo, and push some new features back to origin

Hi all, I'm having a blog-project on GibHub, where a friend of mine, wants to base his code on. He will make some changes to some files that he do not wish to commit back to me (maybe stylesheets and images), but he will maybe implement a new feature that he would like to push back to my project. He should also be able to get new code...

Partial clone with Git and Mercurial

Is it possible to clone only one branch (or from a given commit) in Git and Mercurial? I mean, I want to clone a central repo but since it's huge I'd like to only get part of it and still be able to contribute back my changes. Is it possible? Like, I only want from Tag 130 onwards or something like that? If so, how? Thanks! ...

Maintaining Project with Git

Hi All, I have 2 project, and actually these 2 project is about 80% same each other, the mainly difference is just about language and business model, one is for larger audience using english language and have a 9$/month business model, another is using local language with freemium business model. Sometime when I want to add new feature/...

How do I git-add with wildcards when ignored files are present?

I'm using msysgit on Windows 7 x64. I can't figure out how to tell Git to add a lot of files when there are some files that .gitignore might ignore. For example: Initialize a git repository. Create a .gitignore with contents: *.foo Create files "test.txt" and "test.foo". Try git add . When I try this, git complains that test.foo ...

Fetch from svn. Commit to remote git.

I'm new to git and I'm trying to understand if it can solve my problem. A project has a public read-only svn repo. I want to make and track my own changes to its source over time. While still fetching changes from the svn repo. Of course I can do this easily with git-svn. I just never performing a dcommit. The added issue is that I...

Why can't Git merge file changes with a modified parent/master?

I have a file with one line in it. I create a branch and add a second line to the same file. Save and commit to the branch. I switch back to the master. And add a different, second line to the file. Save and commit to the master. So there's now 3 unique lines in total. If I now try and merge the branch back to the master, it suffers a m...

What does "warning: unable to unlink website: Operation not permitted" mean when checking out a Git branch?

I'm trying to create a local branch that tracks a remote branch. Here's what I get: > git checkout master > git push origin origin:refs/heads/myBranch Total 0 (delta 0), reused 0 (delta 0) To [email protected]:myrepo/myproject.git * [new branch] origin/HEAD -> myBranch > git fetch origin > git checkout --track -b myBranch origin/my...

What are the differences between TFS, SVN and GIT?

I use Microsoft Visual SourceSafe for version control. I like that change this approach and use a newer software for this work, now I want to know that what are the differences between these three application? Which one is better? Are these solutions integrated with visual studio? ...

When will `git pull --rebase` get me in to trouble?

I understand that when I use git pull --rebase, git will re-write history and move my local commits to occur after all of the commits in the branch I just pulled from. What I don't understand is how this would ever be a bad thing. People talk about getting in to trouble with git pull --rebase where you can end up with a branch that o...

How can I create a custom cleanup mode for git?

I'd like to have a commit message cleanup that will not necessarily remove lines beginning with a # in the message itself. The default --cleanup=strip removes all lines starting with a # character. The reason being is unfortunately, the Trac engine's wiki formatter uses hashes in the beginning of a code block to denote the syntax type....

Is git / tortoisegit ready to replace snv / tortoisesvn on windows?

I've been using SVN through tortoise and svn:// protocol on windows for a couple of years and I'm pretty comfortable with it. Nevertheless there are a couple of features I'd like to hove, mainly shelves (something like local commits) and easier branch / merge support. From my experience, svn / tortoise on windows is rock solid stuff. ...

How do I make git use the editor of my choice for commits?

For example, I would prefer to write my commit messages in vim, but it is opening emacs. How do I configure git to always use vim instead? Note that I want to do this globally, not just for a single project. ...

How to setup a private Git repository on GitHub? Is it even possible?

I intend to share my source code on an invite-only basis to a few dozen users maybe. The source code itself should not be public. Participants are allowed and encouraged to submit their changes. So i need source control, preferably Git, hosted on a public server with private access level for multiple users. I learned that it is possible...

Git and multiple repositories

I'm using github to store my PowerShell profile. I found posh-vcs that I'd like to use on top of my actual implementation. I'd like to be able to merge changes from posh-vcs to my current environment. What would be the best way to handle this? Just have one repository for my files, and in another folder have the posh-vcs? Or is this an ...

Git branching / rebasing good practices

I have a following scenario: 3 branches: - Master - MyBranch branched off Master for the purpose of developing a new feature of the system - MyBranchLocal branched off MyBranch as my local copy of the branch MyBranch is being rebased against and pushed to by other developers (who are working on the same feature as I am). As the ow...

Git for Local Branches

How can I differentiate between two local branches in git ? How can I copy one local branch to another local branch ? In general how can I perform difference operation between two local branches on my server using git. I tried looking it up online but there is not enough documentation on that or there is not clear documentation on tha...

git merge should ignore one directory

I have tons of data in directory called reports. While doing git merge with another branch I am getting lots of conflicts for files under reports directory. I would like git merge to ignore files under reports. In another words I would like all the data from reports from master and not from lab branch. Is that possible? This is what I...

How Do I 'git fetch' and 'git merge' from a Remote Tracking Branch (like 'git pull')

I have set up some remote tracking branches in git, but I never seem to be able to merge them into the local branch once I have updated them with 'git fetch'. For example, suppose I have remote branch called 'an-other-branch'. I set that up locally as a tracking branch using git branch --track an-other-branch origin/an-other-branch S...