Showing posts with label git. Show all posts
Showing posts with label git. Show all posts

Friday, February 24, 2012

#some changes in "git merge" as of 1.7.10

in the following blog post Junio C Hamano explains a small change in how "git merge" operates (from 23.02.2012):

http://git-blame.blogspot.com/2012/02/anticipating-git-1710.html

...Nobody explained why the merge was made in a merge commit, because in order to do so after git merge already made the commit, they have to go back and run git commit --amend to do so.

Recently in a discussion on the Git mailing list, Linus admitted (and I agreed) that this was one of the design mistakes we made early in the history of Git. And in 1.7.10 and later, the git merge command that is run in an interactive session (i.e. both its standard input and its standard output connected to a terminal) will open an editor before creating a commit to record the merge result...

a new command line option will be introduced that controls this functionality:

[snip]
...it will be sufficient to run the command with the --no-edit option and accept the canned commit log message without editing.

--

Saturday, September 17, 2011

#googlecode now allows git

google's blog post (25 august 2011)

if you maintain a googlecode repository you can now switch to git.
(there is also mercurial support)

here are some notes on how to start:

new local repository:
git clone https://username@code.google.com/p/projectname/
[enter googlecode pass and/or set it permanently in .netrc]
warning: You appear to have cloned an empty repository.
[cd into dir and create some file test.txt]
git add .
git commit -m "first commit"
git log
git push origin master
git ls-remote origin
[should show hash of remote refs/heads/master and HEAD]

to create a new branch:
git branch newbranch
git checkout newbranch
git push origin newbranch
git ls-remote origin
[should show that newbranch is present as remote]
--

Thursday, May 26, 2011

#listing files in a remote git repository

here is a small batch script for windows (msysgit) that will list the files from a certain branch in a remote git repository. i wrote the initial script some time ago because i wanted git have this functionality with a single cmd line, but finished it just yesterday.

git_lrt.zip

it works as follows:
git_lrt some-url some-branch
git_lrt some-url some-branch > logfile.log


if no branch is given 'master' will be used.

what it does is (if you want to port to linux bash for example):
- create local temp folder
- init a git repository in there
- add remote from url
- fetch objects
- list remote files for branch
- clear local temp folder (& repository)

you may find the script useful to check the contents before cloning a small repository to your local windows hard drive. it seems there might be a possible vulnerability in msysgit where files that are part of the repository can be written to system folders. an example that mr. tale gives:
cockos forum post

--