Reputation: 6230
I have some questions about GIT, I'm using SourceTree.
Q1: how to view the history of a file, like in SVN we just right click on the file and could show log to view complete history of a file, how to view in GIT. Some background of this questions is, i made a pull request and it was showing some deleted files, but there was not any commit showing that files were deleted.
Q2: How the clean up the branches to SourceTree. Background: i have number of tasks on a repository, some of them are done, but their branches are still there in the source tree listing, is there some way to delete the branch only from sourceTree. I know we can delete a branch, but that will delete the branch from GIT as well, but i just want to hide the branch from SourceTree for the cleanup, is there some way for this.
Q3: We create number of branches on any repository, branches are derived from "Base Branch" say some main branch. To maintain the code properly we sometimes merge the Base Branch back to current task branch. Is there any rule that tell us after which status of ticket we should not merge the Base Branch back to current branch.
Upvotes: 2
Views: 8678
Reputation: 541
Q1 (Answer): To see the file history in sourcetree: ... you should see the file in commit changes, then right click on the file --> Log Selected. It will open a list of commits that have changed selected file.
Upvotes: 0
Reputation: 457
1) I suggest downloading tortoisegit you can right click a folder and it will show you pretty much everything for it, alternatively in SourceTree click the pull and it will show you the files that changed during the pull, right click on the file and select blame selected, you can then click on each commit regarding that file to see what changed.
2) You can delete the branch locally yes, right click and delete, if you remove it here it won't remove it from main (origin repository) in SourceTree there is a drop down that says Remotes, if you delete the branche from here then it will remove it from the main repo.
3) Not entirely sure what you're asking, sounds like you're talking about GitFlow
Upvotes: 1