mmliner.blogg.se

Smartgit remote prune
Smartgit remote prune











smartgit remote prune

The other option is to manually edit the ‘Working Tree’ pane below both windows. take all changes in our branch while ignoring the changes in the merging branch or ‘Take Right’ in which case all changes in your branch will be lost and everything in the merging branch will taken. There are plenty of options to resolve the conflict. On the left hand side it will show the changes on our branch and on the right it will show the branch we are merging from and below will be the end result.ġ4. Right click on GitTestMain.java and select ‘Conflict Resolver’ which will bring up the window below. You can resolve this using a text editor or SmartGit’s conflict resolver.ġ3. In the ‘Changes’ pane it will have conflict marked with ‘HEAD’ and the branch that you are merging with ‘origin/feature’. This is because there are changes in the feature branch that conflict with the ones in the master branch and these need to be resolved. You will get a dialog box saying ‘Merge failed’. Select the feature branch and click the ‘Merge’ button below. Right below that line is the ‘feature’ branch and you will notice that graph is diverted there, which means that there are changes in the feature branch that isn’t present in the master branch. The green triangle shows you were your current working tree is pointed to which is ‘master’ the current branch you are working on. In the ‘Branches’ drop down on the right of the dialog select ‘feature’ and you will see the screenshot below. Click on the ‘Merge’ button in the toolbar. Now lets merge the changes from the feature branch into master branch. You will now see the change that has just been committed.ġ1. Select GitTestMain.java in the ‘Files’ pane and click on the ‘Log’ button. Press ‘Ctrl+1’ to make GitTestMain.java visible again if not already visible. These are the same steps as step 2 and 3 except at this time you will click on ‘Commit and Push’ġ0. A commit dialog will popup and enter a comment. Select the file and click ‘Commit’ on the toolbar. Go to SmartGit and once again you will GitTestMain.java will be highlighted in red denoting that the file has been changed. Now add another line in GitTestMain.java distinctly different from what was done in the feature branch. If there are some conflicting changes then SmartGit will not let you switch.ĩ. In Git, we can switch between branches with ease in the same working directory without the worry of overwriting changes made in the current branch. Don’t worry the changes made in the feature branch is safe in the remote repo. Now go back to GitTestMain.java and you will see that the change you had made in the feature branch has disappeared because SmartGit has replaced the file with the one in the master branch which is the branch we switched to in step 7. In the dialog box that pops up select ‘master’ and click ‘Switch’.Ĩ. Click on the ‘Switch’ icon on the tool bar. In the ‘Changes’ pane it will show the latest change that has been made in the feature branch.ħ. Here you will see two lines and the first line will be ‘feature’ with a green triangle besides it which denotes that this is our current branch. Select GitTestMain.java and click on the ‘Log’ button in the top toolbar to bring up the ‘Log’ window. This will show all unchanged files in the ‘Files’ pane. Press ‘Ctrl + 1’ or click on the 3rd last button from the right on the toolbar just below the ‘Main’ button. This is because the commit we made in step 3 has been pushed to the remote repo in step 4.Ħ. Now lets go back to SmartGit and look at the ‘Log’ window. You will see two branches one ‘master’ and another named ‘feature’.

smartgit remote prune

Open a browser and go to your github repository created in the previous post (In our example, ) and click on the branch drop down. Right click on it and select ‘Push Commits’. In the bottom left is a ‘Pushable Commits’ window. As soon as the Commit button is clicked you will see that the GitTestMain.java file is no longer displayed in the ‘Files’ pane.Ĥ. You will see in the ‘Changes’ pane SmartGit will display the change that been done. Now commit the file by selecting the GitTestMain.java file and clicking the commit button.

smartgit remote prune

As soon as you make any change you will see that SmartGit will highlight the file in red.ģ. Now proceed to make changes in the file GitTestMain.java. Click the button ‘Add branch and switch’Ģ. It is a prerequisite that you have followed all the steps mentioned in my previous post titled ‘Github and SmartGit’ġ. In this post we will play around with branches and understand how SmartGit displays version information in the Log window.













Smartgit remote prune