Under unversioned files, select the file that was renamed and click find renames, you can lower the Min Similarity setting if the renamed file has been changed and a match was not found. Or you can use the detect renames dialog by right clicking on any file and selecting Detect renames: To handle renaming of files in order to keep file history, you can either right click on the renamed file and select Was renamed from > original filename. To commit only parts of a changed file, click the file in the file list then on the right hand side you can see a list of the changes, in that window you can tick what changes you want to include in the commit: Note if you use your github or bitbucket login email address the username on the commit online will appear linked to your account, if you want to keep your email address private for github you can use Display Name and for bitbucket under settings on the website for the repository you can map names to user accounts. There you can specify the username, and optionally save this either in your settings file for the local repository or the global settings file for future commits. If you click options just above the commit message window, you should see this dialog: The file list only shows changes so if you don’t see the change you want to commit just click the refresh button just above the file list. You can right click the file and select Add file before clicking the commit button if you want, but it will still only be included as part of the commit if you have ticked the first. Note if it’s a new file that was unversioned you will be prompted to add untracked files. To make a commit tick the files you want to include, type a commit message and click the commit button: In order to commit you must either select the working directory in the commit history or click the commit icon (green tick) in the top toolbar. Here is a guide you can follow to setup SSH on Windows: While mercurial_keyring extension is available under Windows, under Linux you will have to install it first before it will appear under TortoiseHg extensions that you can enable: 1 The password can also be defined here in the settings file but then it’s being stored in plain text in a known location which is less secure than using mercurial_keyring. If the prefix matches part of the repository url then the specified username will be used. How the settings file works is gh or bb can be anything and is just a way to group the auth settings together. Then the next time you do a push or pull you will only be prompted for password and this will automatically be saved for future use. Once enabled as long as you specify the username either in the repository url ( hggit doesn’t support this) or in the settings files: In order to save the credentials the recommended approach is to enable the mercurial_keyring extension to securely store the password (see Settings file / enabling extensions on how to do this). HTTP/S auth will work straight away prompting you for username or password every time you do a push or pull. The two most popular ones are bitbucket and github and both offer free plans, bitbucket is great because it supports Hg as well as Git but github only supports Git so you’ll need to use the hggit extension, see using tortoisehg with git for details. This is because an online service provides better backup protection in case something happens to your machine and makes it easier to share your repository with others since you’re not having to maintain your own server. While you can create a repository on you local machine by File > New Repository and even serve it up over HTTP by Repository > Web Server, it is recommended to use an online source hosting servce. Also to learn the Hg commands for all these steps you can open View > Show Console and see what was run when you performed the step in the GUI, you can also just enter Hg commands here if that’s faster. While a number of things can be done via context menus in file explorer, this guide will be focused on doing everything inside TortoiseHg Workbench. You also have the option of push/pull from a different repository as well. When you’re ready you can push one or more commits to a central repository other developers also work with, or pull new commits from the central repository to your local repository. For those new to Hg from a SVN background basically in Hg the entire repository is located in your working folder so commit and update happens in your own copy of the repository. This guide mostly contains things you’ll probably pick up after just a few days working with TortoiseHg, but it also contains tips I didn’t learn until much later. Here is a guide on how to use TortoiseHg. Linking commits to online issues / changesets.Push / pull commits to a remote repository.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |