HOW TO: Create a new branch with git and manage branches

in dlike •  7 years ago  (edited)

share-with-dlike.jpg

>Kunena Forum - Forum / Bulletin Board / Discussions component for Joomla - This is the 5.x main development branch. Please do not open issues regarding earlier versions of Kunena - Kunena/Kunena-Forum

 

So every once and a while you find some real gems locked into github.  I am unfamiliar with the Kunena Project or their forum, but as I am constantly forgetting the git commands I need, I was searching for a guide to help me.

 

As I work my way through the data camp course on git, and I am working locally with the coffee source site, I need to use these git commands to make a new branch, save it, and do all these sorts of other things developers 'do'.

 

As I searched google for a 'cheat sheet', I came across this very nice guide by user jorgeso, and I have bookmarked it to refer back to it.  

 

I can now create a new branch for coffeesource with the code:

git checkout -b steemlogs

 

And the steemlogs branch was born!

 

More exciting information to come!


Source of shared Link

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

I have some (not a lot) experience with git. Let me know if you need help or have questions. :) 🙏 Good luck, have fun.

Posted using Partiko iOS

Thank you! You can be my go to person!

Well basically my issue is this, I started editing my project! Then I realized I was still on master, so I made a new branch now. Now I think I can just keep pushing my edits right? Later I can log in and merge them in the git website?

Appreciated ahead of time, there is a lot to learn about coding no matter how much you know, I suppose, and I don't know much ;p

Generally you would make your changes in your private branch/fork. Then you merge or create a merge request to merge back to master. It’s possible master advances and becomes incompatible with your branch. In that case, you will need to rebase and resolve merging conflicts.

After bug fix or feature is merged you can deleted the branch, it’s purpose is fulfilled.

Another handy command: ‘git status’. Shows you what files you’ve touched in the repo, forgot to add (‘git add’) etc.

You are committing changes locally. You only need to log in to push to the remote server, once you are ready (tests passing).

This post has received a 3.13 % upvote from @drotto thanks to: @sbi-booster.

You got voted by @curationkiwi thanks to ecoinstant! This bot is managed by @KiwiBot and run by @rishi556, you can check both of them out there. To receive maximum rewards, you must be a member of @KiwiBot. To receive free upvotes for yourself (even if you are not a member) you can join the KiwiBot Discord linked here and use the command !upvote (post name) in #curationkiwi.

Congratulations! This post has been upvoted from the communal account, @minnowsupport, by ecoinstant from the Minnow Support Project. It's a witness project run by aggroed, ausbitbank, teamsteem, someguy123, neoxian, followbtcnews, and netuoso. The goal is to help Steemit grow by supporting Minnows. Please find us at the Peace, Abundance, and Liberty Network (PALnet) Discord Channel. It's a completely public and open space to all members of the Steemit community who voluntarily choose to be there.

If you would like to delegate to the Minnow Support Project you can do so by clicking on the following links: 50SP, 100SP, 250SP, 500SP, 1000SP, 5000SP.
Be sure to leave at least 50SP undelegated on your account.