From: Jeff Carr <jcarr@linuxmachines.com>
To: git@vger.kernel.org
Subject: git-ls-new-files & make patch, pull, etc.
Date: Mon, 22 Aug 2005 19:07:13 -0700 [thread overview]
Message-ID: <430A84D1.2050206@linuxmachines.com> (raw)
Something simple like the perl script at the bottom would be useful for
showing files that haven't been added via git-update-cache --add already.
I've also found it useful to start adding things to the Makefile's of
the projects I'm putting in git repositories. I think it would be useful
to come up with some standard or recommended names. That could start to
extend the common "make" "make install" with a few other options for
projects that use git as their SCM.
Thanks,
Jeff
patch:
git-diff-files -p
push:
git-send-pack `cat .git/branches/origin`
pull:
git-pull-script `cat .git/branches/origin`
git-read-tree -m HEAD
git-checkout-cache -q -f -u -a
commit:
vi changelog.txt
GIT_AUTHOR_NAME="$(GIT_AUTHOR_NAME)" \
GIT_AUTHOR_EMAIL="$(GIT_AUTHOR_EMAIL)" \
git-commit-tree `git-write-tree` -p $(HEAD) < changelog.txt > .git/HEAD
rm changelog.txt
add_all:
./git-ls-new-files |xargs -n 1 git-update-cache --add
#!/usr/bin/perl
# Shows you what files have not been added to your git repository
my %allfiles;
# make a hash of all the files except the .git/ directory
foreach my $file ( `find . -type f` ) {
chomp $file;
next if substr($file, 0, 7) eq "./.git/";
$allfiles{ $file } = "";
}
# now delete all the files from the hash that are already commited
foreach my $file ( split "\n", `git-ls-files` ) {
chomp $file;
delete $allfiles{ "./$file" };
}
# print out what's left
foreach my $file ( sort keys %allfiles ) {
print "$file\n";
}
next reply other threads:[~2005-08-23 2:05 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-23 2:07 Jeff Carr [this message]
2005-08-23 5:15 ` git-ls-new-files & make patch, pull, etc Junio C Hamano
2005-09-06 20:42 ` Jeff Carr
2005-09-06 21:08 ` Junio C Hamano
2005-09-08 22:19 ` Jeff Carr
2005-09-09 3:19 ` Junio C Hamano
2005-08-23 6:48 ` Johannes Schindelin
2005-09-06 19:06 ` Jeff Carr
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=430A84D1.2050206@linuxmachines.com \
--to=jcarr@linuxmachines.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.