![]() ![]() That all depends on how in-depth you intend for the tutorial to be. I don't think you really need to go into detail about not using it, especially if the others are new to version control. With regard to your tutorial, I would just say that "99 times out of 100, this is the option you want to use". Just because there is no good reason - in theory - to not use this feature, in reality, there can be any number of good reasons. So, you - along with the rest of the team - don't commit merged changes until you are sure that there are no changes made by this co-worker that will affect your work. The merge contains changes to shared common code made by this co-worker. This co-worker has a history of breaking things. A co-worker is working on a different feature branch. From here, everything you do is the same as you did when you added the supplyrequest file and initially committed it. Open the view in Sourcetree and notice that your repository now has uncommitted changes. Let's say you pull master to your feature branch. Making a change to the file by adding the following item to the list of supplies: anti-gravity speakers Save the file. So, the reason for not wanting to use this feature is self-evident: you want to perform the commit manually, or not at all. The "Commit merged changes immediately" option is not so much an option, as it is a command shortcut. SourceTree: On the top bar click on icon 'Stash', type its name and create. Though this is technically not the 'proper' way to discard changes (as other answers and comments have pointed out). Moreover, this command will leave the current branch as it is and bring all uncommitted changes to the new branch. The git checkout -b command will create a new branch and switch to it.If you want to discard these changes later just git stash drop (or git stash pop to restore them). Next, let's see how to move the changes to a new branch and keep master unchanged. That's because Git itself doesn't commit unless you explicitly tell it to, and SourceTree is a Git GUI. This stores all uncommitted changes in the stash. If you don't set that option, the files appear in SourceTree as uncommitted changes. ![]() SourceTree: On the top bar click on icon Stash, type its name and create. If you want to discard these changes later just git stash drop (or git stash pop to restore them). These changes are not automatically committed to the local, unless you set "Commit merged changes immediately". This stores all uncommitted changes in the stash. gitignore at the root of your repo and add. In your case though, instead of adding the files one by one to a. gitignore file to ignore the file in future. After a merge, there may be changes to files in the local repo. After this, if you see the file listed in Unstaged files, you can use right-click > Ignore. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |