How do I merge this branch to master?
thufir@dur:~/NetBeansProjects$
thufir@dur:~/NetBeansProjects$ git clone -b 4.GUI_loading_messages_slowly git@github.com:THUFIR/USENET.git
Cloning into USENET...
remote: Counting objects: 3782, done.
remote: Compressing objects: 100% (1274/1274), done.
remote: Total 3782 (delta 1647), reused 3613 (delta 1478)
Receiving objects: 100% (3782/3782), 388.55 KiB | 100 KiB/s, done.
Resolving deltas: 100% (1647/1647), done.
thufir@dur:~/NetBeansProjects$
thufir@dur:~/NetBeansProjects$ cd USENET
thufir@dur:~/NetBeansProjects/USENET$
thufir@dur:~/NetBeansProjects/USENET$ git branch -a
* 4.GUI_loading_messages_slowly
remotes/origin/1.FetchBean_CLI
remotes/origin/2.some_GUI
remotes/origin/3.messageId__string
remotes/origin/4.GUI_loading_messages_slowly
remotes/origin/HEAD -> origin/master
remotes/origin/master
thufir@dur:~/NetBeansProjects/USENET$
thufir@dur:~/NetBeansProjects/USENET$ git checkout -b master remotes/origin/master
Branch master set up to track remote branch master from origin.
Switched to a new branch 'master'
thufir@dur:~/NetBeansProjects/USENET$
thufir@dur:~/NetBeansProjects/USENET$ git branch
4.GUI_loading_messages_slowly
* master
thufir@dur:~/NetBeansProjects/USENET$
thufir@dur:~/NetBeansProjects/USENET$ git diff master 4.GUI_loading_messages_slowly
diff --git a/src/META-INF/persistence.xml b/src/META-INF/persistence.xml
index 252f563..3cebe3d 100644
--- a/src/META-INF/persistence.xml
+++ b/src/META-INF/persistence.xml
@@ -2,8 +2,8 @@
<persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http:/
<persistence-unit name="USENETPU" transaction-type="RESOURCE_LOCAL">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
- <class>net.bounceme.dur.usenet.database.Article</class>
- <class>net.bounceme.dur.usenet.database.Headers</class>
+ <class>net.bounceme.dur.usenet.model.Article</class>
+ <class>net.bounceme.dur.usenet.model.Newsgroup</class>
<properties>
<property name="javax.persistence.jdbc.url" value="jdbc:mysql://localhost:3306/usenet
<property name="javax.persistence.jdbc.password" value="password"/>
diff --git a/src/net/bounceme/dur/usenet/controller/ArticleNewsgroup.java b/src/net/bounceme
index b65737a..a9fadd2 100644
--- a/src/net/bounceme/dur/usenet/controller/ArticleNewsgroup.java
+++ b/src/net/bounceme/dur/usenet/controller/ArticleNewsgroup.java
@@ -5,8 +5,8 @@ import java.util.logging.Level;
import java.util.logging.Logger;
import javax.mail.Message;
import javax.mail.MessagingException;
-import net.bounceme.dur.usenet.database.Article;
-import net.bounceme.dur.usenet.database.Headers;
+import net.bounceme.dur.usenet.model.Article;
+import net.bounceme.dur.usenet.model.Newsgroup;
import net.bounceme.dur.usenet.model.Usenet;
thufir@dur:~/NetBeansProjects/USENET$
thufir@dur:~/NetBeansProjects/USENET$ git merge 4.GUI_loading_messages_slowly
Auto-merging src/net/bounceme/dur/usenet/controller/Page.java
CONFLICT (content): Merge conflict in src/net/bounceme/dur/usenet/controller/Page.java
Auto-merging src/net/bounceme/dur/usenet/database/DatabaseUtils.java
CONFLICT (content): Merge conflict in src/net/bounceme/dur/usenet/database/DatabaseUtils.java
Auto-merging src/net/bounceme/dur/usenet/model/Usenet.java
CONFLICT (content): Merge conflict in src/net/bounceme/dur/usenet/model/Usenet.java
Automatic merge failed; fix conflicts and then commit the result.
thufir@dur:~/NetBeansProjects/USENET$
thufir@dur:~/NetBeansProjects/USENET$
It’s not so much that I want to “fix” the conflicts but simply replace master with the branch. Perhaps rebase?
The merge worked as advertised, but only after deleting the master branch:
The merge only worked because I first deleted the master branch, which seems a bit extreme, but there you are. Otherwise, I wasn’t sure how to fix the conflicts without, as the fine manual suggests, editing the files so that they match. I just don’t understand the point of a merge if you first have to manually edit things so that they match a different branch, it seems the there should be a prompt about that, not an error message.
With the proviso that you cannot delete the master branch with
push origin :masteron github without first changing the default branch, easy peasy. I find it somewhat aggravating that merge won’t always merge automagically, and will sometimes barf back that there are conflicts. I don’t see why merge can’t return an advisory, and then ask “are you sure?” and then merge anyhow. In any event, I learned a (little) about git, in particular how to delete a branch.I don’t understand the meaning of
Already up-to-date., I mean, the origin on github certainly isn’t up to date, so I wonder what’s up to date. Presumably the local copy is up to date now, but why is it “already” up to date?