Skip to content

Pull removes untracked files locally #53

Closed
rilldata/go-git
#1
@emaincourt

Description

@emaincourt

Hi,

Thank you for the great work you've been doing with go-git. I've used it to start a new project and it works really well.

As a new user I guess I might be doing something wrong, or miss a concept, but here I have a very basic Pull operation on a repository which looks like this:

if err := w.Pull(&gogit.PullOptions{}); err != nil {
	if err == gogit.NoErrAlreadyUpToDate {
		return nil
	}
	return err
}

The folder into which the repository lives also contains untracked files. If I run this pull operation with go-git, all the untracked files are being removed from the directory. On the other hand if run a manual git pull in my terminal from the same folder, untracked files get preserved as expected.

Could you please help me ?

Thanks in advance

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is neededno-autocloseIssues/PRs to be ignored by stale bot

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions