:: Re: [DNG] Ho do I remove added file…
Top Page
Delete this message
Reply to this message
Author: Edward Bartolo
Date:  
To: dng
Subject: Re: [DNG] Ho do I remove added files using git?
Hi all,

I messed up git. Please somebody intervene to help.

This is the 'git status' output and it is ugly!
----------------------


$ git status
On branch master
Your branch and 'origin/master' have diverged,
and have 2 and 3 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)
You have unmerged paths.
(fix conflicts and run "git commit")

Changes to be committed:

    new file:   backend_src/src/automated_scanner.13.09.2015.c
    new file:   backend_src/src/automated_scanner.gslist.c
    new file:   backend_src/src/backend
    modified:   backend_src/src/caller.c
    new file:   backend_src/src/core_functions.backup.c


Unmerged paths:
(use "git add <file>..." to mark resolution)

    both modified:   backend_src/src/automated_scanner.c


Untracked files:
(use "git add <file>..." to include in what will be committed)

    backend
    backup/
    lib/
    netman
    packagers.readme
    ppas.sh
    removed_but_working_functions.pas
    y


------------------------

I want to get rid of those 'new' files and the 'modified' file.


Thanks

On 19/09/2015, Edward Bartolo <edbarx@???> wrote:
> Hi,
>
> I added two useless files to netman that I want to remove: these are
> netman.lpi and netman.lps.
>
> What should I do? git is rejecting my changes like this:
> $ git pull
> error: Your local changes to the following files would be overwritten by
> merge:
>     netman.lpi
>     netman.lps
> Please, commit your changes or stash them before you can merge.
> Aborting

>
> I want to also delete my latest two git commits to the repository if
> that is possible.
>
> Edward
>