You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@bigtop.apache.org by Victor Chugunov <vi...@yahoo.com> on 2012/04/09 09:44:20 UTC

Need help with git diff

Roman,
can you please tell the steps to do a git diff on the new files
I tried git add <filename>, git add -N <filename> and after git diff <filename> 
and nothing was working
after doing git stash I've lost all my changes

Victor

Re: Need help with git diff

Posted by Victor Chugunov <vi...@yahoo.com>.
Nice idea, but we need a presenter 
Victor



________________________________
From: Doug Chang <do...@stanfordalumni.org>
To: bigtop-dev@incubator.apache.org
Sent: Mon, April 9, 2012 11:19:26 AM
Subject: Re: Need help with git diff

hey victor why we dont cover this on sat??, others must have questions
also....but are too afraid to ask...

dc

On Mon, Apr 9, 2012 at 8:57 AM, Konstantin Boudnik <co...@apache.org> wrote:

> Victor,
>
> I'd suggest to consider this http://gitready.com/ if you're new to git.
>
> Cos
>
> On Mon, Apr 09, 2012 at 12:44AM, Victor Chugunov wrote:
> > Roman,
> > can you please tell the steps to do a git diff on the new files
> > I tried git add <filename>, git add -N <filename> and after git diff
> <filename>
> > and nothing was working
> > after doing git stash I've lost all my changes
> >
> > Victor
>

Re: Need help with git diff

Posted by Doug Chang <do...@stanfordalumni.org>.
hey victor why we dont cover this on sat??, others must have questions
also....but are too afraid to ask...

dc

On Mon, Apr 9, 2012 at 8:57 AM, Konstantin Boudnik <co...@apache.org> wrote:

> Victor,
>
> I'd suggest to consider this http://gitready.com/ if you're new to git.
>
> Cos
>
> On Mon, Apr 09, 2012 at 12:44AM, Victor Chugunov wrote:
> > Roman,
> > can you please tell the steps to do a git diff on the new files
> > I tried git add <filename>, git add -N <filename> and after git diff
> <filename>
> > and nothing was working
> > after doing git stash I've lost all my changes
> >
> > Victor
>

Re: Need help with git diff

Posted by Konstantin Boudnik <co...@apache.org>.
Victor,

I'd suggest to consider this http://gitready.com/ if you're new to git.

Cos

On Mon, Apr 09, 2012 at 12:44AM, Victor Chugunov wrote:
> Roman,
> can you please tell the steps to do a git diff on the new files
> I tried git add <filename>, git add -N <filename> and after git diff <filename> 
> and nothing was working
> after doing git stash I've lost all my changes
> 
> Victor

Re: Need help with git diff

Posted by Lei Zou <le...@gmail.com>.
Hi Victor,


I think you can do the following steps:

cd ~/bigtop

## let's say you like to add a new file Lei.txt

# do diff, there is no difference
:bigtop lei$ git diff

# create a dummy new file
:bigtop lei$ echo "Lei Zou" > Lei.txt

:bigtop lei$ git diff

# add the file to local repository
:bigtop lei$ git add -N Lei.txt

# do the diff and find out the difference
:bigtop lei$ git diff
diff --git a/Lei.txt b/Lei.txt
index e69de29..53503b0 100644
--- a/Lei.txt
+++ b/Lei.txt
@@ -0,0 +1 @@
+Lei Zou
:bigtop lei$


I hope it helps.

Lei Zou

On Mon, Apr 9, 2012 at 12:44 AM, Victor Chugunov <vi...@yahoo.com> wrote:

> Roman,
> can you please tell the steps to do a git diff on the new files
> I tried git add <filename>, git add -N <filename> and after git diff
> <filename>
> and nothing was working
> after doing git stash I've lost all my changes
>
> Victor

Re: Need help with git diff

Posted by Harsh J <ha...@cloudera.com>.
The best way to diff would be to do so against last known HEAD:

$ git diff HEAD

This will include "git add"-ed files.

If you have done "git stash" then the changes are stashed away. Simply
do "git stash pop", and your stashed changes will get reapplied.

Hope this helps!

On Mon, Apr 9, 2012 at 1:14 PM, Victor Chugunov <vi...@yahoo.com> wrote:
> Roman,
> can you please tell the steps to do a git diff on the new files
> I tried git add <filename>, git add -N <filename> and after git diff <filename>
> and nothing was working
> after doing git stash I've lost all my changes
>
> Victor



-- 
Harsh J