Closed
Description
I was trying to unstage files. I can add file fine by using
let mut index = repo.index().unwrap();
index.add_path(Path::new(&path)).unwrap();
I saw we can use the remove_path like this
let mut index = repo.index().unwrap();
index.remove_path(Path::new(&path)).unwrap();
index.write().unwrap();
but this deletes file not remove changes
what can I do?
and I saw this remove but the 2th parameter stage is an int but have no more detail
https://docs.rs/git2/latest/git2/struct.Index.html#method.remove
Metadata
Metadata
Assignees
Labels
No labels