git

Changing github credentials

I am a collaborater : my github account name is dave I am also the repo owner : my github username is chief I have managed to fork one of chief's projects, commit and submit a pull request to him. Now I need to accept that pull request. How do I switch to chief's credentials, so that I can clone chief/projectname.git ...

Git: How to reset after merging?

I've merged a master branch from a friend's repository into my working directory into branch_a using: git pull my_friend master I've discovered that the merged version has errors. To continue development I would like to revert to my last commit before the merge. I tried: git reset --hard HEAD But that brought me back to the state r...

What is the opposite of `git diff HEAD^`?

In git, I can specify the previous revision by saying HEAD^ or HEAD~1. What about going the other way? Suppose I'm on revision X, and I do git checkout X^. How do I go back? Something like git checkout X+? ...

How to get git to work through a proxy and IntelliJ Idea?

Hi All: Where to I configure the proxy settings for GIT in IntelliJ Idea? I've gotten the proxy settings working for the plugins, but I just can't find it for GIT; and the help files only mention subversion. Any help is appreciated. ...

Learning Git. Need to know if I am on the right track

Before I started using Git as my SCM, I would "throughly" test the code for stability then I'd just copy the working directory and rename it to something like (date)project_name. Then if I messed up somewhere and couldn't dig myself out I would just start from the last stable directory. Then I heard about Git. I want to know if I'm usin...

filtering out other files, respecting renames

I've got a repository that effectively contains a bunch of different modules. I'd like to split it out into separate repositories, keeping the version history of the files in those repositories. A simple approach to this problem would just involve cloning the repo and then doing something like git filter-branch \ --tree-filter $'f...

Git: how to get back to most recent version?

I have recently moved from SVN to Git and am a bit confused about something. I needed to run the previous version of a script through a debugger, so I did git checkout <previous version hash> and did what I needed to do. Now I want to get back to the newest version, but I don't know the hash for it. When I type git log, I don't see it. ...

git svn imported repository using svn branches

I've cloned a replicated svn repository (svnsync to local file system). All the branches etc. are now available in git. Now i would like to start working on svn branches git checkout remotes/B_XYZ and doing some commits via git. Now i want to change to a different SVN branch via git checkout remotes/B_ABC and doing some changes a...

How to block HTTP access to a Git repository?

I'm playing around with the idea of using Git for deployment and updates of my web applications, but the problem is that by doing it the way I'm doing it, the .git directory (and therefore all my source code) would be accessible via HTTP. This is what is holding me back from really implementing this idea. How do I prevent HTTP access to...

Workflow for maintaining different versions of a webapp using git?

At my company we're using git for a couple of months now (and we're happy about it), but we still don't get git for the full 100%. Our main product is a website which we offer in different languages (frontend + admin backend). Some of these websites offer features others shouldn't offer (e.g. the type of fields that need to be filled in...

Using Git, how I should use it and what are the standards ?

I have a few questions about git. I have read a couple of documents illustrating how git command works. But never one that talked about how Git could be used and its behaviors. I'm using SmartGit as interface and only rarely use the command prompt(which I should do more often) and I connect to my own git server on my network. First off,...

using git locally while the server is still a cvs server - cvs reports files as modified when they should be identical

Hi, We have a cvs repository at work which we can't change right now but i want to use Git locally. I don't need anything fancy (in terms of cvs import). What i have done is checkout the cvs repository into a directory, then make that directory a git repository. After which i committed all the cvs files into the git repository. Howe...

Analyze SVN/GIT repos to determine how much work is actually done?

One of my clients is using an out-of-state programmer for a project. He can't really figure out how much work the programmer is actually doing, so he's afraid that money is potentially going down the drain. What I'm wondering, is it possible to use a SVN or GIT repository to calculate or estimate how much real work is actually being don...

Git checkout does not throw away my changes

I am using git 1.7.1 on Windows XP with cygwin. The issue can be best illustrated by example: $ git status # On branch master # Changed but not updated: # (use "git add <file>..." to update what will be committed) # (use "git checkout -- <file>..." to discard changes in working directory) # # modified: system/application/con...

How does a git branch relate to other branches in my repo?

I'd like to view the context of commits around a git branch: any nearby ancestors or descendants in my repo. This is easy with gitk if the branch is recent and appears at the top. It's tedious if the branch is old. ...

Files missing from a git clone

So here's what happened: On machine A, I cloned a shared git repository. Then I started a new branch, added a directory with a bunch of files in it, committed, and pushed the new branch. On machine B I then cloned the same shared repository, created a remote tracking branch for the new branch I'd pushed, and pulled. Somehow, certain ...

How to assign value of a git command to a variable using script

Is it possible to assign the value a git command like git rev-list -n 1 --before=<timestamp> master to a variable. Ex: commits = git rev-list -n 1 --before=<timestamp> master then I want to something like git tag RELEASE_01 $commits[0] My repository is on a windows XP system and I'm using msysgit. Thank you ...

git hook post-merge - error: cannot run

To trigger a git hook after a pull i made a post-merge hook. The script looks like this: #!/bin/sh git log > gitlog.txt The file is called 'post-merge' and has the same owner as the one that runs the pull command. Also it has the right permissions : 755. When u do i git pull [remote] master i get this error: error: cannot run .git/h...

Remove file from commit

Hello, I have a list of changed files in git repository. There is one file I don't wanna commit for the current moment. Can I do: git commit -a To commit all files and then somehow remove that file from current commit? After such removing it should still be in the list of uncommited files. ...

View nonmerged commits to a branch on git

What's the best way to view commits that were originally committed to a specific branch. For example, if I have two branches Jack and Kate: Jack: A-B-C-m-F / Kate: D-E Is there a command that lists A, B, C, and F as commits made on Jack. I know there are ways to visualize this, but on projects with lots going on it's...