kevin Abel

Ranch Foreman
+ Follow
since Jan 15, 2018
Merit badge: grant badges
Biography
I have worked as both an employee and contractor since 1983.  Most of the time I was coding for the end product but most of the time I worked with automation QA tools.   I'm on a long term project at this time. 
I wondered if I work for the money or the enjoyment of it.  Now that I have the ability to retire but I don't I know the answer.  
For More
Pembroke PInes, Florida
Cows and Likes
Cows
Total received
8
In last 30 days
2
Total given
0
Likes
Total received
37
Received in last 30 days
0
Total given
118
Given in last 30 days
3
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by kevin Abel

I started the class over from the start.    It is making more sense now.   It reminds me of the book I used to solve the Rubix cube. Maybe it's a poor analogy.  The git commands seem like algorithms.  I know what I want to do.  Then I have to find the keyword with parameters to make it happen.  I'm enjoying this.  However I don't find it easy to learn.

The commands I have seen, so far, in the class are:

git commit
git branch
git checkout
git merge  <with the other branch>
git rebase  <with the other branch>

I got an answer on the first level ,  Quiz 4.    Rebase introduction.

My answer seems close.   Is there a way to remove the commits at the bottom and then recommit bugFix?

Thanks,

Kevin

Stephan wrote:Level 3 of the second series ("Ramping up"; "Relative Refs #2") explains how you use the git branch command to move a branch pointer to a different location. Review that lesson before you try the level you're stuck on.



I'll go back to the start of the second series and take notes of the git commands and what they do.  I have about 25 commands written on paper and typed in a file on EverNote.  

Question:  What is the difference between main,  the branch with the *,  HEAD and master(obsolete)  ?    

Thanks,

Kevin
Stephan,

I did a search and found the solution sheet.     I think that I'm missing a middle piece of knowledge.   I know the basics of git and very little of branching.  These examples seem to be for more advanced branching.  Is that correct?  

I'm enjoying going through the teaching screens, guessing at the answers and then seeing how the answers work.   It will probably take about 6 hours to go through the rest of the class.   Even though I don't completely understand everything, I will  remember commands such as "git cherry-pick C3 C4 C7" exist.

I'll go back to W3schools for git because there has to be some base knowledge that I don't have.    

It was a bad time to get hit with covid.    I run into a new thing to learn and my mind only wanted rest.  I slept for about 18 hours a day back and when I woke up I felt great but tired.    I'm way better now.  

I'll go get some sleep and look at this tomorrow.

Thanks,

Kevin
I started wondering if I understood git at all so I took the introduction quiz on W3schools and got an 88 of 100 percent.  I can do the simple activities like adding to staging, committing,  sending and getting work from github.    This branching, switching, moving branches is not making sense to me.

Stephan,

I get a burst of energy every couple of hours and I experiment with these exercises.  

Here are some more guesses.  I will stop.  I need assistance.

Thank you,

Kevin
Here are educated guesses that are not working.

The git commands I should use should have something to do with these:


git checkout main^          
git checkout HEAD~4
git branch -f HEAD~3

The first one worked for moving HEAD from C2 to C1.

I tried some other git keywords but it turned into a mess and I started over.

Thanks,

Kevin  
Stephan,

I was looking at git and other IT things and nothing was making sense.   It felt like brain fog.   Then I started getting strange symptoms.  I took a home covid test and I'm positive.   I cough, get weak and have to rest over and over.

Ill try looking at git a little bit, but I have to keep lying down.  

Thanks,

Kevin
This is in section Ramping up 3:
Relative Ref #2

I think that these are the ingredients that I need to use.   I don't know where/when or exactly how.

HEAD go back one parent.   Somehow use ^

bugFix go back 3.   Maybe something like :   branch -F main HEAD

Move main to be child of F5   :  probably uses ~ somehow.

I need some clues please.

Thanks,

Kevin
Stephan,

I made it a few more quizzes ahead on my own.   Now I am stuck on this one.    Should I make a new thread for each question next time?

Stephan,

I'm back.  I understand the answer as I follow along with your notes.  Not on my own yet.

git branch bugFix          -branches can be made quickly anytime the user needs one.  
git checkout bugFix      -It moves the asterisk * to bugFix so it becomes the tip, HEAD?   git has focus here.   I'm not exacly sure what the * means.


Now, you create commit C2 from the bugFix branch:

git commit      -  it adds C2 and gives it the *

Now we need to create commit C3, but from the main branch:

git checkout main   -  
git commit     -  I makes a fork.   C2 is bugfix .    C3 is main with the *

Finally, we rebase commit C2 onto the main branch:

git checkout bugFix   - C2 Bugfix gets the *
git rebase main   - It says solved and removes the result which I wish I could  still see.  It is the same as the goal so I can go look at it there.

I'll try the next on on my own and then probably scream for assistance.  

Steve,
I keep forgetting what some git keywords perform.    I took out the combined shortcut git commands and I added in what I think they are performing.  You did this already, but maybe if I say what I see occuring you can tell what I don't understand.   I did follow  your instructions and it worked on my second attempt.  I must have typed something wrong the first shot.  

Take the assignments one commit at a time. First focus on C2. From the end goal, it's clear that C2 should be made from the bugFix branch. bugFix doesn't exist yet, so start by creating it and checking it out:

git branch bugFix          -branches can be made quickly anytime the user needs one.  
git checkout bugFix      -It moves the asterisk * to bugFix so it becomes the tip, HEAD?   git has focus here.   I'm not exacly sure what the * means.


Now, you create commit C2 from the bugFix branch:

git commit      -  it adds C2 and gives it the *

Now we need to create commit C3, but from the main branch:


I'm not done working on this yet.   I am pressing Submit so that I don't lose my work.  I need to leave for now, but I'll get back to it in a day or two.  Thank you.  Kevin


git checkout main   -  
git commit            

Finally, we rebase commit C2 onto the main branch:

git checkout bugFix
git rebase main


Stephan,

Have you done the exercises in the link?      

I'm on Part 4 of the introduction sequence.

I first need to get to the image that i attached before I can attempt the git  rebase command.

I'm using
git branch
git switch
commit

and I cannot get it to look like the attachment.  

Best,

Kevin
This is the book that I am mentioning.   It did a great job until I go to the part about branching.  I followed along and did the exercises until the branching part and nothing was matching the book.  

My observation of the book is that the first few examples didn't give me the same results.   Then I had a streak of 20% further into the book where I was learning quickly.  Next I reached branching and I was lost.

As I learn git,  I'll probably return to the book because it is very good at explaining topics and the example are very good.   It seems to me that the person reading the book needs to have some prior experience with git.
 
https://a.co/d/8dE6tjG

Thanks,

Kevin
Stephan,

I looked at the site again the next day.  It is great!  
I'll keep on using it.

If  someone reads this thread,   my suggestion is to read the basics in the Learn git at lunch time in a month.    If you get stuck like I did,  watch the video I mentioned above.  

I might not be able to have followed the instructions on this site without some background information.

Try this site.  

I'll probably go back and read the book and see how much further I can go.

I'll want to go back to Java learning, but I'll be able to store my work using git.

I'll want to read the Head First Git book.

Best all,

Kevin