What is the difference between doing:
mkdir repo
cd repo
git init
git remote add origin git://github.com/cmcculloh/repo.git
git fetch --all
git pull origin master
and
git clone git://github.com/cmcculloh/repo.git
I mean, obviously one is shorter, but other than that are they basically doing the same thing?
...
I am programming on mac, and I don't really understand what Git does with the end of line of my files :
I created a repository with some files in Unix format (LF end of line).
When I clone the repository that I created, all my end of lines are CRLF. Shouldn't it detect automatically that I need LF end of line ?
I have autoclrf set to ...
I have a file.txt in trunk and i created a branch based on the trunk called Branch.
The file.txt contains the following as the content:
a
b
c
d
And In the branch, i modified the file.txt to be
a
c
d
e
So after I merged the branch back to the truck, then file.txt becomes this: (I believe I did several merge on this fil...
I have a personal laptop and a dev box and want a setup with following things in mind:
I want to have my code working on both machines. (That means I cannot have --bare repo.)
I want to develop on my laptop
I want to push to dev box from time to time.
This is mainly for web development.
I tried initializing a Git repo with code on d...
At my workplace we use SVN for version control. I switched to git-svn when I found out about it, and recently I decided to sync some of my private branches to another remote git repo. The workflow, then, consists of rebasing from and pushing to the SVN repo via git-svn, while working on separate private feature branches that are pushed t...
If I do this in one of my repositories:
git subtree pull --prefix=frameworks/AquaticPrime --squash AquaticPrime
I get this:
Working tree has modifications. Cannot add.
If I do this (in the same place, of course):
git status
I get this:
# On branch master
nothing to commit (working directory clean)
I'm not quite sure what's g...
When I write
git push heroku master
my app is successfully pushed to heroku, but it takes about 30sec to a minute because it says it is "Installing gem rails 2.83" and that "Rails is not declared in either .gems or Gemfile."
How do I fix this? What exactly is the .gems file and where does it live?
Thanks a lot. I am completely new to ...
Hey,
I'm just curious, Where Git get installed (via DMG) on Mac OS X file system?
...
I'm a git newbie and I keep reading about a "master" branch. Is "master" just a conventional name that people used or does it have special meaning like HEAD?
When I do git branch on the clone that I have, I only see 1 single branch - the one I'm on. No "master" at all. If I type git checkout master (as I see in alot of tutorials or guid...
Can someone point me in the direction I need look so I can configure my GIT client with the password needed for my private key? Every time I push and pull from my repository it asks me for the password for my key. I use command line and have the windows GIT client installed to use ssh.
Thanks for any pointers.
...
I want to use customized template for hg log which looks like this:
hg log --template '{node|short} {desc} [{date|age} by {author}]\'n --color=always
This in default terminal color is not very readable, so for instance I would like to make node red and desc green. How can I do this? In git I can define this kind of formatting like thi...
I'm having a hard time getting a hook to run either on initial clone (this does not seem possible since the hooks don't get cloned anyhow) or on a simple pull.
I'm using git to manage a number of config files, and I need to maintain proper file ownership and perms. In my main repo, I have commit hooks set to call the "setgitperms.pl" s...
Hi,
Current situation:
origin/mybranch --- A1 --- B1 --- A2 --- B2 --- A3 --- B3 mybranch
I want to clean that history up (A1 to B3), esp. since I have not pushed it anywhere yet and because I want to prepare a patch which just those B*.
What I want is:
origin/mybranch --- A1+A2+A3 --- B1+B2+B3 mybranch
I probably will not pu...
I need help figuring out the branches that need to be created in git. Two developers working on two different features. A test version is needed to test both features. If only one of the features is required for the production version, how would you create the branches in git so that only one of feature is merged to master which is what ...
Is it redundant to run git add . and then git commit -am "commit message"?
Can I just run git add . and then git commit -m "commit message" or, alternatively, just git commit -am "commit message"?
...
So I have a Git project, and we (a mostly typical Rails project) have a pretty deep directory structure.
When I do git merge I see results like:
app/views/shared/exception_report.erb | 6 +
app/views/ui/sample.html.erb | 11 +-
app/views/verifications/new.html.erb | 10 +-
config/de...
I'm trying to get GitPython 0.3 to commit a file to a repository. Roughly, I'm doing this as follows:
data = ...
istream = repo.odb.store(gitdb.IStream(git.Blob.type, len(data), StringIO(data)))
entry = git.BaseIndexEntry((stat.S_IFREG | 0644, istream.binsha, 0, path))
index = git.IndexFile.from_tree(repo, repo.heads['master'])
index.ad...
Hello,
I have a simple alias to display few last commits:
log --pretty=format:'%h %an %s' -10
How can I make the results to be displayed in columns, like this:
898e8789 Author1 Commit message here
803e8759 Other Author name Commit message here
...
I'm trying to convert an old CVS repository tracking a vendor branch to git, and I'm running into a merge issue.
The repository is structured like this:
dir1/
dir2/
dir2 comes from the upstream branch. Upstream converted to git already, and dir2 in our repo is the root of their git repo. I want to add them as a remote and merge their...
I like to commit locally at every opportunity - ending up with all sorts of comment spam in my git repository. Changes may get reverted multiple times, never mind that late night commits contain interesting expletives. Is there an easy way to filter my git push to a public repository to remove all of the comment spam?
Ideally, I would l...