git

What's the best way to replace remote.origin.url in Git?

I'm new to Git. Let's say Alice and Bob had been developing their project by using two Git repositories for each. And, Alice at certain times want to set up a new repository to manage their common progress. Do you think what is the best way to replace remote.origin.url in the configuration of Git? to replace by git config --replace to ...

github initial upload

Hello all, I'm trying to do my initial upload to github. I think I have everything configured correctly, and I've done the readme commit and origin master push and added my files, but I don't see any changes on github. When I do something like: git commit --no-verify -m "some more files for initial add" I get: [master 6fcc942] s...

Output of git branch in tree like fashion

Right now, when I type "git branch" it lists my branches in an arbitrary order. What I would prefer would be if "git branch" listed my output in a tree like fasion, somethign like: master |-- foo |-- foo1 |-- foo2 |-- bar |-- bar4 Where here, foo & bar were branched from master; foo1 & foo2 were branched from foo; bar4 was bra...

git checkout master/branching question

Hello all, I 'm relatively new to git and and having some problems early on. I've made several commits, but when I try to push them I get a response that says everything is up-to-date. I feel like my problem is the same on listed in this question, but it recommends the following: $ git log -1 # note the SHA-1 of latest commit $ git chec...

git diff. I AM missing something here.

Every time I do a git diff, despite a MILLION commits since the first one, it keeps on giving me these REALLY OLD changes that were committed AGES ago to do with file deletions. I deleted an entire folderful of stuff in a commit about 7 commits ago, and still on branch or merge, git acts like the deletion is new. Doing GIT DIFF STILL s...

Latest Git - No SSH option on install

I installed 1.7.0.2 on Windows 7 and didn't see an option to choose the Git's ssh or Plink for the secure client. How do I set this? Does the environment variable GIT_SSH still work? ...

Trusted development path in git with signatures

I'd like to build a trusted path for software development. This means that every change in to code must be signed by the author and one reviewer, before being accepted. These signatures for the changes must be verifiable at release time, or there must be some other means of making sure the repository can not have been tampered, or additi...

Is it possible to create a remote repo on GitHub from the CLI without ssh?

I did: ~$ mkdir projectname ~$ cd projectname ~$ git init ~$ touch file1 ~$ git add file1 ~$ git commit -m 'first commit' So... Is there any git command to create a new remote repo and push my commit to GitHub from here? I know it´s no big deal to just fire up a browser and head over to Create a New Repository but if there is a way to...

Does a git repo always have to be in its own directory

I would like to have multiple files in a folder with are managed by different git repositories. Is it possible? I have the following folder structure for a project. It is part of a Git repository: plugins/ - plugin.a.php - plugin.b.php - plugin.c.php I would like plugin.b.php to be part of another repo. For example, I want the dev...

How to pull specific directory with git

hello, I have a project with git, and I just want to clone or pull a specific directory, like myproject/javascript just like subversion does. make some changes, commit and push back again. It's possible? ...

How can I do git checkout on a repository with submodules?

Suppose I have a repository X with a sub module A. Now suppose I want X to have two branches: master and development. I want master to have a different revision of A than development does. How can I switch back and forth between these branches? I've got a repository set up that does this (but using real names instead of fake ones!)....

What's the best way to manage a multi-user project on github?

I'm looking to host a new project on github. This project will be worked on by two coders. One of these coders will also be the project manager who will have overall control over the github repo. I've followed the instructions regarding forking a github project at http://help.github.com/forking/. This all works fine and I'm working on t...

In git, what is the difference between merge --squash and rebase?

I'm new to git and I'm trying to understand the difference between a squash and a rebase. As I understand it you perform a squash when doing a rebase. ...

How to get back to the latest commit after checking out a previous commit?..

I sometimes check out some previous version of the code to examine or test. I have seen instructions on what to do if I wish to modify previous commits -- but suppose I make no changes. After I've done e.g. git checkout HEAD^, how do I get back to the tip of the branch?.. git log no longer shows me the SHA of the latest commit. ...

Ensuring all git commits make it back to CVS when using git-cvs

I'm using git-cvs, and my general workflow is something like this: ...write some code... $ git commit $ git cvsexportcommit -c -p -v <asdf> $ git cvs-import $CVSROOT $ git pull This generally works fine for pushing my commits back to the CVS server and keeping things in sync. However, I'm wondering how I will realize that something i...

How can I view multiple git diffs side by side in vim

I'd like to be able to run a command that opens up a git diff in vim, with a tab for each file in the diff set. So if for example I've changed files foo.txt and bar.txt in my working tree and I ran the command I would see vim open with two tabs. The first tab would contain a side-by-side diff between foo.txt in my working tree and foo....

How to rebase one Git repository onto another one?

Hi there! I had one Git repository (A) which contains the development of a project until a certain point. Then I lost the USB stick this repo A was on. Luckily I had a backup of the latest commit, so I could create a new repository (B) later where I imported the latest project's state and continue development. Now I recovered that lost ...

git: How to diff changed files versus previous versions after a pull?

I'm new to git, using it via Terminal on Snow Leopard. When I run "git pull" I often want to know what changed between the last version of a file and the new one. Say I want to know what someone else committed to a particular file. How is that done? I'm assuming it's "git diff" with some parameters for commit x versus commit y but I ...

Git branch strategy for small dev team

We have a web app that we update and release almost daily. We use git as our VCS, and our current branching strategy is very simple and broken: we have a master branch and we check changes that we 'feel good about' into it. This works, but only until we check in a breaking change. Does anyone have a favorite git branch strategy for smal...

cloning a git repo (on a media temple server)

Hello all, I've got a media temple server which already has git installed. How can I clone files from a repository I have hosted on github? ...