git

Git tutorial: Understanding git pull and branches (using a specific example repo)

Backround: Suppose I have the following Git URLs (hosted on github) http://github.com/mikl/drupal.git git://github.com/mikl/drupal.git (Git read-only) I am interested in having a local copy of this repository so I can pratice working with branches in git and see how my local working tree can change depending on which branch I am w...

Git commit -a question

What is the difference between: git commit -m "added a new page" and git commit -a -m "added a new page" I know that the -a option will stage files that have been modified and deleted, but then what does running it without the -a mean? Thanks for reading. ...

How can I 'git clone' from another machine

Hi, In 1 machine (ip 192.168.1.2), I create a git repository by $ cd /home/hap/working $ git init $ (add some files) $ git add . $ git commit -m 'Initial commit' And I have another machine in the same WiFi network, How can I get clone from the other machine? Thank you ...

Committing hunks from inside of git add -i?

Is this possible? It would be nice if I didn't have to switch back and forth between git-add -i and git commit when breaking apart hunks into different commits. Is there a better way to do this? Or am I doing something wrong? ...

Merging in git: via git-svn, says Already Up-to-date, but git-diff says there are differences

I'm using git-svn to work with a codebase and I need to merge changes in trunk to my branch. I have both branches fetched in git, and when I run git diff trunk while in my branch, I can see all the changes. When I run git merge heads/trunk, however, I get a message "Already up-to-date". It's clearly not up to date. What am I doing wr...

Error finding tcl.init when running Git GUI

I get the following error message when I try to start the Git GUI: Error in Wish Can't find a usable init.tcl in the following directories: ... [list of directories follows, init.tcl is in the first one listed] This probably means that Tcl wasn't installed properly. I'm running Windows 7 and I'm sure this problem ...

When to delete a branch from Git?

I'm relatively new to Git, and want to get advice on best practices for deleting branches. After I've created and merged a branch back into master, should I leave it hanging around for historical purposes, or should I delete it as soon as it's no longer needed for housekeeping purposes? ...

How do I get git whatchanged to show a combined list of files that have changed?

I ran the following comand git whatchanged 7c8358e.. --oneline and got the below output. Is there a way to generate a single combined list of files that changed across all commits? In other words, I don't want files to show up more than once in the below list. Thanks! 4545ed7 refs #2911. error on 'caregivers_sorted_by_position' reso...

Amazon secret keys and Heroku

I'm using S3 in this application for uploaded files, as Heroku has a read-only filesystem. How can I give my s3.yml to Heroku, but avoid checking it into the main repository? ...

View a git diff-tree in a reasonable format

Howdy, I'm about to do a git svn dcommit to our svn repo -- and as is recommended in a number of places, I wanted to figure out exactly what I was going to be committing with a dry run. As such I ran: git svn dcommit -n This produced output: Committing to http://somerepo/svn/branches/somebranch diff-tree 1b937dacb302908602caedf17981...

What .gitignore I should use with QT projects? (QT Creator)

So, after little thinking I have wrote the following: # In repository we don't need to have: # Compiled object files *.o # Generated MOC, resource and UI files moc_*.cpp qrc_*.cpp ui_*.h # Debug and Release directories (created under Windows, not Linux) Debug/ Release/ # .log files (usually created by QtTest - thanks to VestniK) *.l...

Is this scatter-brained workflow realizable in Git?

This is what I'd like my workflow to look like at a conceptual level: I hack on my new feature for a while I notice a typo in a comment I change it Since the typo is completely unrelated to anything else, I put that change in a pile of comment fixes I keep working on the code I realize I need to flesh out a few utility functions I d...

git push error 'remote rejected] master -> master (branch is currently checked out)'

Hi, Yesterday, I post a question regarding how to clone a git repository from 1 of my machine to another. http://stackoverflow.com/questions/2808177/how-can-i-git-clone-from-another-machine/2809612#2809612 I am able to successfully clone a git repository from my src (192.168.1.2) to my dest (192.168.1.1). But when I did an edit to a f...

Version control of Mathematica notebooks

Mathematica notebooks are, of course, plaintext files -- it seems reasonable to expect that they should play nice with a version-control system (git in my case, although I doubt the specific system matters). But the fact is that any .nb file is full of cache information, timestamps, and other assorted metadata. Scads of it. Which mean...

branch from a previous commit using git

hi there If I have n commits, how can I branch from the n-3 commit? I can see the hash of every commit. ...

use hooks in git to import and export to cvs

i would like to know if this is possible: create a shared git repository that connects to cvs post two hooks to it: everytime anyone pulls from it, it imports from the cvs repository everytime anyone pushes to it, it exports to the cvs repository basically create a 'lazy mirror' of a cvs repository that is completely transparent to...

How do negated patterns work in .gitignore?

I am attempting to use a .gitignore file with negated patterns (lines starting with !), but it's not working the way I expect. As a minimal example, I have the folllowing directory structure: C:/gittest -- .gitignore -- aaa/ -- bbb/ -- file.txt -- ccc/ -- otherfile.txt and in my gitignore file, I have this: aaa/ !a...

How can you indicate files to ignore in svn when using git and the git-svn bridge?

There is a master subversion repository that I've cloned a git repo from. I've got a lot of ignored files in my .gitignore that I'd like the svn repository to know about. I know that I can use git svn show-ignored to pull the ignored list from subversion, but how can I do the reverse? Send a list of files to be ignored back to the svn...

Accept all merge conflicts in git

I'm trying to do a merge and there's a bunch of conflicts. It's all generated files so what I want to do is basically say "ignore all merge conflicts, and check everything in from my own repo". I've tried git checkout . --ours git add -A git com -a It gives me an error though because there are still files in the "unmerged paths" buc...

Routinely sync a branch to master using git rebase

I have a Git repository with a branch that hardly ever changes (nobody else is contributing to it). It is basically the master branch with some code and files stripped out. Having this branch around makes it easy for me to package up a leaner version of my project without having to strip out the code and files manually every time. I hav...