I need to get a previous file version in git tower,
I mean get the full code present inside file as it was 1 week ago (before a lot of edits from other users), and copy it somewhere on my desktop.
I already located that version of the file in tower, and if right click on it I get this menu:
What should I do?
After you identified the commit, click on it to make it active.
In the commit details (middle pane), choose Tree in the menu in the upper right corner. Locate the file you need in the tree and right-click it. Then choose Export to save it to your desktop.
Try the next command being abdcef the hash of the commit you want to recover
git checkout abdcef /path_to_file
Related
I moved a file one folder up. Now in Azure DevOps in commit content I see [rename] written next to the file, but I do not see how the file name was changed (i.e. I do not see the old file name). Is there any way I could find this out?
Hovering over the file name in the commit content diff explorer shows a title containing the information I was looking for. It says {new branch name} [rename] renamed from {old branch name}.
Would be nice not to have to hover over to see this though. Since sometimes there are a lot of files. Hopefully Microsoft will add another way to view this in future.
Right now I'm manually selecting each changed file for staging before committing. I'm curious whether there's a SmartGit equivalent to
git commit -a
perhaps a shortcut to select all changed files (other than those being .gitignored).
When having selected the repository root directory in the Repositories view and having the focus in this view, operations like Stage and Commit will work on all available files, regardless of which files are currently visible in the Files view (e.g. you might have selected to hide untracked files).
You can select all changed files in the Files pane with standard OS shortcut. On Windows this is Ctrl+A. Then you can stage the selection as usual.
Note though that if you are going to commit only the whole files, you don't even need to stage them. After you selected files of interest, you can press Commit, and then make sure the "Local Changes" option is picked on the top of the dialog. SmartGit will stage and commit selected files for you automatically.
Months back I started populating a wiki for someone else's GitHub repo.
I put instructions here.
Yesterday I decided I wanted to add a new page. Nobody has modified the wiki in the meanwhile so I figured I can just repeat those instructions from...
Make the edits:
:
So I run gollum from /path/to/MathBox/mathbox.wiki/ (which currently contains a Home.md and Slides.md which correctly reflects the wiki as is), launch my browser at localhost:4567, and add a new page by adding [[foo]] to the homepage, saving it, clicking it.
Which opens it up as blank page in edit mode, and I then add some dummy text, save, quit browser, quit gollum.
But the files in the current folder haven't changed. Home.md should have an extra line, and there should be a new Foo.md file containing my dummy text. But nothing!
And even stranger, running Gollum again shows the wiki in its new state. So my changes are getting recorded somewhere. But as it is not in the working folder, GitHub Desktop doesn't grok that I have made modifications.
What's going wrong here?
Gollum reads and stores files on a git repository, it doesn't read from uncommitted files stored in the current directory.
When you are creating a new file using its internal editor it will create a file with the content and will commit it to the local repository.
But when you create a file with an external editor, you have to commit it so gollum can read it from a a git repository.
I have checked out a directory, modified some files and checked in the directory
Is there a way to revert back the checked in directory and start with original directory
Thanks in advance.
Never delete a version, this is way too dangerous (in that it removes all metadata, and hyperlinks attached to it).
Do a subtractive merge, in order to cancel the contributions recorded in your last directory version.
See in IBM the articles "To remove contributions of some versions".
You can see an example of a cleartool merge -delete in "Undo remove file in ClearCase"
You may try to delete the version. In the version tree, right-click the bubble of the current version and choose "delete". The version tree will automatically refresh and fail to do so, because the version it tries to display does not exist anymore. After an update you should see the old version.
If you have edited multiple files, you will have to do this for each file. I haven't found a way to do this by command line, but then again I haven't looked thoroughly ;)
I've got files in TFS that are not showing in the solution explorer of VS 2010. Another developer committed the files to TFS. I can see the files in TFS, and they are even being copied to my local directory, but they aren't appearing in the solution explorer.
What am I doing wrong?
Also, when my coworker committed his changes, it is marked as changeset 99. When I look at the hierarchy of the main branch (where he committed the changes to), it says the latest version is changeset 9 (which is the changeset that created that branch). Why does the hierarchy view say its latest changeset is 9 when clearly the latest changeset is 99? Am I using the tools incorrectly?
Thanks
This is a 'known' bug in VS/TFS. If you checkout a file from the 'Solution Items', VS goes and removes the file from the project.
To show files on the solution explorer you have to add files to the TFS and you have to update your project files also. You can try Show all files button on solution explorer.
For changeset number issue - pres Ctrl+G on the Source Control Explorer. Enter number 99 or click Find for more search options. Check changeset details or track changeset. Maybe you are checking wrong project collection or it is a bug.