Closed SimonDing87 closed 8 years ago
NOTE: i named my mongodb config file "config.js" and it config.js was in the .gitignore, so it did not get added. The next commits fix this.
Cool, so the conflicts you had were very minor and actually a really good way of practicing merge conflicts :)
In the future we can do one of two things: either you can try to resolve them locally and then this pull request will update to reflect that, or I can clone your feature branch, resolve them locally, and open a new Pull Request. I went ahead and resolved it myself and opened a new Pull Request with all of your commits + my merge commits at https://github.com/mks-greenfield/trendr/pull/26.
Here's what I did:
git checkout -b SimonDing87-development development
git pull https://github.com/SimonDing87/trendr.git development
(2.2.3) polina: trendr-MASTER (SimonDing87-development)*$ git status
On branch SimonDing87-development
You have unmerged paths.
(fix conflicts and run "git commit")
Changes to be committed:
modified: .gitignore
new file: mongodb/config.js
new file: mongodb/models/locationTrend.js
new file: mongodb/models/trend.js
modified: public/app/components/chart/chartController.js
modified: public/app/components/simon/simonView.html
modified: server.js
Unmerged paths:
(use "git add <file>..." to mark resolution)
both modified: package.json
both modified: public/app/components/simon/simonController.js
Looks like there's conflicts in two files: package.json
and simonController
. Took a look at what was causing the conflict:
(2.2.3) polina: trendr-MASTER (SimonDing87-development)*$ git diff
diff --cc package.json
index 31854a0,5ff2b22..0000000
--- a/package.json
+++ b/package.json
@@@ -24,10 -24,8 +24,15 @@@
"express": "^4.13.3",
"foreman": "1.4.1",
"fs": "0.0.2",
++<<<<<<< HEAD
+ "grunt": "0.4.5",
+ "grunt-contrib-jshint": "0.11.3",
+ "grunt-contrib-watch": "0.6.1",
+ "grunt-notify": "0.4.3",
++=======
+ "mongodb": "2.0.52",
+ "mongoose": "4.3.3",
++>>>>>>> e7234f9e82f7bf50bade40979e2458aa33367cf1
"morgan": "^1.6.1",
"path": "^0.12.7",
"request": "^2.67.0",
diff --cc public/app/components/simon/simonController.js
index c9a3101,49caae0..0000000
--- a/public/app/components/simon/simonController.js
+++ b/public/app/components/simon/simonController.js
@@@ -1,5 -1,19 +1,24 @@@
angular.module('simon', [])
++<<<<<<< HEAD
+.controller('SimonController', function($scope) {
+ $scope.message = "Simon's div";
++=======
+ .controller('SimonController', function($scope, $http) {
+ $scope.getStuff = function() {
+ $http({
+ method: 'GET',
+ url: '/test'
+ })
+ .then(successCallback, errorCallback);
+ }
+
+ var successCallback = function(response) {
+ // console.log("response.data", response.data);
+ }
+
+ var errorCallback = function() {
+ // handle error
+ };
++>>>>>>> e7234f9e82f7bf50bade40979e2458aa33367cf1
});
(END)
After you resolve a conflict, you run git add
I changed SimonController to remove:
+.controller('SimonController', function($scope) {
+ $scope.message = "Simon's div";
And left package.json alone bc we want all those libraries.
(2.2.3) polina: trendr-MASTER (SimonDing87-development)*$ git st
On branch SimonDing87-development
All conflicts fixed but you are still merging.
(use "git commit" to conclude merge)
Changes to be committed:
modified: .gitignore
new file: mongodb/config.js
new file: mongodb/models/locationTrend.js
new file: mongodb/models/trend.js
modified: package.json
modified: public/app/components/chart/chartController.js
modified: public/app/components/simon/simonController.js
modified: public/app/components/simon/simonView.html
modified: server.js
(2.2.3) polina: trendr-MASTER (SimonDing87-development)*$ git commit -m "[fix] Remove merge conflicts"
[SimonDing87-development 102486c] [fix] Remove merge conflicts
At this point I've successfully removed all of the issues. Since I cannot push this local branch to Simon's development branch on Github, I pushed this branch to our master Github repo as git push origin SimonDing87-development
. The new Pull Request is here: https://github.com/mks-greenfield/trendr/pull/26.
There was some strange merging / rebasing stuff in git I didn't quite understand. I'm not sure why it's saying it can't automatically merge, but this version is working with mongodb. Let us know if you'd like to discuss what the problem is together.