Azure-DevOps permission to view history without access to code - azure-devops

Is it possible to provide a user with permissions to view the history of a project without giving that user access to the code?

Just as comment mentioned, there is no way to do this in Azure DevOps.
Git uses the parent reference information stored in each commit to manage a full history of your development. Review this commit history could find out when file changes were made and determine differences between versions of your code.
If someone could see repo history, they could also see source code.
As a workaround, you could try to export the history info for commit then give them to the QA user which without access to your code.
launch MS-DOS command line in the .git subdirectory for the solution
issue command: git log --pretty=format:%h,%an,%aD,%s > ./GitLog.csv
wait for GitLog.csv file to appear and open in spreadsheet program
Format option meanings:
%h = commit hash
%an = Author Name
%aD = commit date
%s = subject (comment of commit)
More details please take a look at this question: Export list of all commit details in VSTS / Azure DevOps into file?

Related

TFVC How to get Author(Annotate) with line number?

Actually what I want is like this on Git command answer.
But I need to this TFVC Command.
I have project on TFS Local Server, and I'm using Java Process Builder and I need to command for get last committer information with specific line number on TFVC.
I looked at this site but could not find enough information.

How to delete a file from GitHub history without using commandline

I need to remove a file from history. I don't have commandline access to GitHub. Kindly help if this can done through UI itself.
You can't delete the file from history, but you can delete it from the repository by following this help article
Alternatively, you could do a cherry-picking using one of the Git GUIs software, then cherry-pick all the commits, except for the one that you wanted to removed, into a new branch. Then, delete the old branch.
TO achieve this, you have to have command line access.
Delete file from history
But Using UI , you could delete the file from the repo (branch)
Ex:
Click the delete button on top right corner and commit.
You don't need command line access to GitHub, only to your own local clone, where you can:
either do a git filter-branch (example here)
or use BFG
Then you git push --force.
But the alternative, if you really don't want to use any command line, even locally... would be to contact GitHub support, asking them to remove the file from your remote repo history.
That is a last resort option though, since you are supposed to be able to do that on your own.

How to view file changes before pulling through GitHub on RStudio?

I'm transitioning from using Subversion in Eclipse for code management to GitHub in RStudio. It's starting to make sense, but I can't seem to figure out how to pull effectively.
Specifically, if I use the Pull arrow in RStudio, every file change in the repository automatically updates my local files without warning. I can see how many files were updated, but not what changed!
Here are the questions I'm hoping to get help with:
1) Can I preview the repository file changes in RStudio before I pull them locally? With SVN in Eclipse, there was an indicator showing files with a difference, and the option to view side by side.
2) If multiple files have been changed on the repository, is it possible to pull just 1 locally?
3) How can I revert a local file to a previous version?
Right now I've been trying to do this all within RStudio for simplicity. I haven't used things like the GitHub desktop client.
I appreciate the help!
I would suggest you better get used to the git's own tools to stay informed about your repository.
For example you could do following.
Before you pull, check your current commit logs
git log
This should show you how your current commits stack up. Note the latest commit id (first 4-5 letters would usually do)
Now after pulling you can see the difference using following command
git diff --color your_previous_commit_id..HEAD
If you don't like the changes and want to go back,
you can just reset to your favorite commit with following command. BTW run "git stash save" to keep a copy of your uncommitted changes.
git reset --hard you_favorite_commit_id
Note: that this will delete all your uncommitted changes unless you stashed them and put your local branch behind the remote repo branch you are tracking again.
Wondering where to put these commands? Check https://git-scm.com/downloads.
What's good about using these git tools is that if you switch between IDEs you don't need to search for same functionalities you had in your earlier IDEs.

How to hide unmodified files while check in Github

I am using Github in our Project.
When I am checking in Github to pull data from original master it is displaying all the files but I need the files which are changed by me.
You can use git log to display updated files by author.
See for instance "Can I get git to tell me all the files one user has modified?"
git log --pretty="%H" --author="authorname"
(replace authorname by your own, as you specified it in git config user.name)
After a pull, you can log between master#{1} and master.

How to make github follow directory history after renames?

Once a directory is renamed, "git log" no longer shows its history, unless you force it to, by using "git log --follow".
Is there a way to force the "history" function on the GitHub web UI to use "--follow"?
Alternatively - is there any way to see pre-rename history on GitHub?
Update June 2022: GitHub now supports viewing commit history across file renames and moves!
.
2011: This was requested in 2009 (Request 129), and then in 2010 (Request 897), and then in 2021 (github/feedback discussion 6964):
I like this.
There could be other issues preventing us from plopping the --follow argument in.
I'll take a look and let you know.
... and then nothing for now.
Note: Git 2.6+ (Q3 2015) will propose that in command line: see "Why does git log not default to git log --follow?"
Note: Git 2.6.0 has been released and includes this feature. Following path changes in the log command can be enabled by setting the log.follow config option to true as in:
git config log.follow true
I wrote a chrome extension to enable this. Source on github.
I've sent a mail to support#github.com (salutations removed):
Will "git --follow" functionality ever be implemented on Github? If yes, where can I track its progress?
(By "git --follow", I mean a way to easily see the object revisions before a rename. Currently, when an item is renamed, Github doesn't offer an easy way to display the directory / file history.)
Response:
> Will "git --follow" functionality ever be implemented on Github? If yes,
where can I track its progress?
This is something a few other users have requested as well -- we might add it in the future. We currently don't have a public issue tracker, but I'll put another +1 next to it on the Feature Request Listâ„¢ for the team to see.
So, "git --follow" is unfortunately not supported yet.
To get such functionality in the meantime, I guess you could write a user script that looks up the hash of the parent object, (recursively) look up its history and render the result.