Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.


spicedreams

10 posts

Wannabe Geek


#205245 4-Nov-2016 20:58
Send private message

I am developing software for arduino, and want to join in the whole sharing thing...

 

 

But for some reason I have a blind spot for git, and I would really like someone to help me get going.

 

 

You could pay it forward, or I could help you get started in hardware...

 

 

Best

 

G

 


Create new topic
marpada
475 posts

Ultimate Geek


  #1663996 4-Nov-2016 21:06
Send private message

Where are you located?




mortal
9 posts

Wannabe Geek


  #1664101 5-Nov-2016 06:57
Send private message

Me too! I've been using self-hosted source control systems like SVN for a long time but don't really understand the etiquette around Github and how to work with pull requests, merging conflicts etc.g

spicedreams

10 posts

Wannabe Geek


  #1664149 5-Nov-2016 10:29
Send private message

Hi, I am in Auckland... live on the North Shore, work in the CBD.



amanzi
Amanzi
1292 posts

Uber Geek

ID Verified
Trusted
Lifetime subscriber

  #1664188 5-Nov-2016 12:44
Send private message

My advice is to not try and learn all of git at once. Focus on the few key commands you need to get going. I'm far from a git guru but I can clone a repository (git clone user@host...), make changes (git add *), commit them (git commit -m "First commit!"), and push them back to the master (git push origin master). Once you get that mastered you can start looking at branches and merging and tags. Most of the hosted source control services (GitHub, BitBucket, etc) have tutorials about how best to deal with those services.


Shindig
1585 posts

Uber Geek

Trusted

  #1664640 6-Nov-2016 18:27
Send private message

spicedreams: I am developing software for arduino, and want to join in the whole sharing thing... But for some reason I have a blind spot for git, and I would really like someone to help me get going. You could pay it forward, or I could help you get started in hardware... Best G

 

 

 

What ya up to coding on Arduino?





The little things make the biggest difference.


Yabanize
2350 posts

Uber Geek


  #1664657 6-Nov-2016 19:22
Send private message

The GitHub windows app is easy to use, you set up a folder for the repository, and any changes you make to files inside it picks up the changes which you can then make a commit, it then has a sync button which pushes it up to GitHub


nzkc
1571 posts

Uber Geek


  #1664660 6-Nov-2016 19:36
Send private message

When I first started with git I struggled.  I was using it and not really getting it or understanding why I had to do certain things.  I was blindly following a few basic approaches.  If things blew up (they often did initially) I'd just resync from Github and start my change again.  And then one day I found this video:

 

Git for ages 4 and up https://www.youtube.com/watch?v=3m7BgIvC-uQ 

 

I still highly recommend it today. Its great at getting a handle on what git is doing under the covers.  A really good intro to git in my opinion (if you can get past the dungarees).

 

As for the whole Github integration and why you have that its worth researching (aka Googling) the "git triangle". 


 
 
 

Move to New Zealand's best fibre broadband service (affiliate link). Note that to use Quic Broadband you must be comfortable with configuring your own router.
spicedreams

10 posts

Wannabe Geek


  #1664666 6-Nov-2016 20:07
Send private message

Shindig:

What ya up to coding on Arduino?

 

 

I have built a 'thing' to listen to ocean sounds, intending to discriminate the sound of a vessel actively fishing from any other vessel activity.

 

 

It uses Teensy which is an arduino on steroids, including a digital signal processor, more memory etc.

 

 


darylblake
1162 posts

Uber Geek

Trusted

  #1664674 6-Nov-2016 20:18
Send private message

Its not too difficult. Most nasty devs will say RTFM: https://git-scm.com/docs/ 

 

Firstly your code is kept in a folder on your local machine. You can turn this folder into a git repository, simply by browsing to the folder and typing:

 

$ git init

 

Then you add the files in that folder 

 

$ git add .

 

Now you code is under source control by git you have a large number of options. But you need to commit your files into the project.

 

$ git commit -m "My first commit for project x"

 

Generally the next thing you would do is add a remote origin. This means your project, all its folder structure, changes etc are all replicated in a remote location. Normally this would be a site like Github or Bitbucket. It could even by a private bitbucket or github enterprise server. 

 

You can add an origin to your project by typing:

 

$ git remote add origin https://pathto.git.repo/etc

 

$ git remote -v

 

Then to actually push your files up to the repository you use:

 

$ git push

 

Now your code is remotely stored and is managed by a remote server. Other git clients can now clone your code (if they know the password or its public) and you can create copies of it really easy in other locations.

 

 

 

Now if you want to change your code.

 

All you do is change your code. then type:

 

$ git status

 

This will show you all the of files that have been added, removed or modified. You can then add them to a commit, by using git add filename.xyz or git add * if you are feeling keen. Then you can commit using the commit command above and then push (same as above).

 

 

 

The next thing you need to know is how to get a copy of the code that is in a repository onto your machine. This is done via cloning.

 

$ git clone https://pathto.git.repo/etc.git /path/to/localfolder/where/you/want/to/put/the/files

 

this will download the project to the folder in the 3rd argument. If you dont specify a path it usually make a folder in the current working directory.

 

To pull in any updates, you use:

 

$ git pull 

 

Sometimes git pull will have a moan because you might have modified the files locally so you need to use git stash, or commit your current project to a branch. 

 

I could write more, but I rekon you read up on branches and merging. https://git-scm.com/docs/git-branch 

 

Also using a tool like tortoise git/smartgit/sourcetree for windows or smartgit/sourcetree for mac or meld for linux might make life a bit easier. And if you are using windows make sure you commit your files with unix style carriage returns and have windows convert it automatically, with the exception of windows coding like c# projects. 

 

 


sidefx
3711 posts

Uber Geek

Trusted

  #1664710 6-Nov-2016 22:26
Send private message

darylblake:

 

 

 

$ git pull  

 

 

 

 

blergh.  What you really want is

 

$ git pull --rebase

 

 

 

:)





"I was born not knowing and have had only a little time to change that here and there."         | Octopus Energy | Sharesies
              - Richard Feynman


Create new topic





News and reviews »

Air New Zealand Starts AI adoption with OpenAI
Posted 24-Jul-2025 16:00


eero Pro 7 Review
Posted 23-Jul-2025 12:07


BeeStation Plus Review
Posted 21-Jul-2025 14:21


eero Unveils New Wi-Fi 7 Products in New Zealand
Posted 21-Jul-2025 00:01


WiZ Introduces HDMI Sync Box and other Light Devices
Posted 20-Jul-2025 17:32


RedShield Enhances DDoS and Bot Attack Protection
Posted 20-Jul-2025 17:26


Seagate Ships 30TB Drives
Posted 17-Jul-2025 11:24


Oclean AirPump A10 Water Flosser Review
Posted 13-Jul-2025 11:05


Samsung Galaxy Z Fold7: Raising the Bar for Smartphones
Posted 10-Jul-2025 02:01


Samsung Galaxy Z Flip7 Brings New Edge-To-Edge FlexWindow
Posted 10-Jul-2025 02:01


Epson Launches New AM-C550Z WorkForce Enterprise printer
Posted 9-Jul-2025 18:22


Samsung Releases Smart Monitor M9
Posted 9-Jul-2025 17:46


Nearly Half of Older Kiwis Still Write their Passwords on Paper
Posted 9-Jul-2025 08:42


D-Link 4G+ Cat6 Wi-Fi 6 DWR-933M Mobile Hotspot Review
Posted 1-Jul-2025 11:34


Oppo A5 Series Launches With New Levels of Durability
Posted 30-Jun-2025 10:15









Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.