Journal


Create an empty repo  on Github (using web)

Use Eclipse Egit (I need to)

Clone using the URL

A local repo is created

A remote called origin pointing to the server exists

A default branch called master is created to local

origin/master is linked to local/master

copy the code from my java project

Create .gitignore in the bin directoy

Use Commit and Push

This shows 3 things in egit

1. what files are new and need to be staged. These are listed

2. Allows to stage them (button clicks)

3. Once staged commit and push

4. Commit creates a commit point on local/master

5. Push knows that the local/master is tracked to origin/master and pushes that commit point and the code to origin/master on the server

This is a bit weird and I don't even know how i did this. But somehow stumbled to end up with a valid eclipse java project.

A repo is a collection of branches and commit points

A remote repo and its branches can be tied to the local branches by tracking them, although they don't have to be.

I understand local branches and remote branches

I understand checkout, fetch, merge, conflict, pull, push, and clone and how they effect branches

A single contributor with a local and a remote

Make changes

Use Commit/Push to see changes, stage them, commit them, and push them to the default connected master branch on server from local branch

Only way I could do this is to see the "Commit/Push" dialog box.

Where do I see all the commits and my branches in egit?

Search for: Where do I see all the commits and my branches in egit?

I could not find the equivalent of git log.

You can see changed file in the commit dialog

right click on the changed file and you can roll back to a previous commit

Looks like one can see the commits on a branch in the reflog view in egit

In egit Commit/Push view is also called "Git Staging" view

10/24/2019

More accurately, when I come back after an absence how do I analyze my current branch and the remote branch?

1. It is nice

2. Stand alone and won't interfere with builtin git or gitlens

3. Shows each repo in the root folder of vscode

4. Shows the commit history of remote and local

5. One can look at the latest commit histories in local and remote and make judgments as to what is the change

1. See if there are any files to be staged or committed? (vscode git view will tell you this)

2. See gitgraph history of local branch and remote branch

3. commit all the work if there is to be commited

4. Pull the work from server (Notice, this may result in conflicts which will need to be manually resolved and committed)

5. Push any pending commits

6. That will sync up both

1. Vscode itself with builtin git (Also see the command palette git:...) in addition to the obvious menu items

2. GitLens (To show locals, remotes, and respective branches, and tags)

3. GitGraph (A great tool to see how branches differ or moving). A nice alternative to git log

very important git commands

Search for: very important git commands

It appears a good set of command line tools are very helpful to get a quick sense of where the repos are. Hope to collect these and document in the next rev.

Favorite git commands

Search for: Favorite git commands

Most useful git commands

Search for: Most useful git commands

Essential Git Commands

Search for: Essential Git Commands

1. What are my local branches

2. what are my remotes (also called refs)

3. what local branches are tied to what remote branches

4. is there pending work on my local branch

5. what are the last 5 commits on the remote and their dates

6. what are the last 5 commits on the local branch

7. Is there a discrepancy between the two?

8. How do I pull the latest, merge, and push back to the server

Cloning using VSCode is documented here

git command to stage, commit, and push

Search for: git command to stage, commit, and push