You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to know how to get the difference between the workspace and the staging area in a single folder. For example, I have a directory with two folders in the directory and the directory tree is as follows:
.
├── .git
├── a
└── b
What should I do when I just want to get the change difference of files in directory a?
wt, err := repo.Worktree()
diff, err := wt.Status()
This method can only get changes in all directories, not individually.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I want to know how to get the difference between the workspace and the staging area in a single folder. For example, I have a directory with two folders in the directory and the directory tree is as follows:
.
├── .git
├── a
└── b
What should I do when I just want to get the change difference of files in directory a?
wt, err := repo.Worktree()
diff, err := wt.Status()
This method can only get changes in all directories, not individually.
Beta Was this translation helpful? Give feedback.
All reactions