element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Essentials
  • Learn
  • Learning Center
  • Essentials
  • More
  • Cancel
Essentials
Forum GIT course
  • Forum
  • Documents
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Essentials to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 38 replies
  • Subscribers 1018 subscribers
  • Views 7580 views
  • Users 0 members are here
Related

GIT course

dougw
dougw over 5 years ago

It might be useful to present an introduction and basic user guide to GIT repository …..

  • Sign in to reply
  • Cancel

Top Replies

  • beacon_dave
    beacon_dave over 5 years ago +9
    This free eBook download via Apress Open may be of interest in the meantime ? Pro Git Authors Scott Chacon Ben Straub https://link.springer.com/book/10.1007%2F978-1-4842-0076-6
  • balearicdynamics
    balearicdynamics over 5 years ago in reply to beacon_dave +4
    I oblige all my collaborators to download and read this book. That is also on my Kindle
  • beacon_dave
    beacon_dave over 5 years ago in reply to beacon_dave +4
    Springer Link also have a free textbooks 'Covid 19 package' on the go at the moment: https://link.springer.com/search?package=mat-covid19_textbooks&showAll=true Amongst others, there are some books on…
Parents
  • Jan Cumps
    Jan Cumps over 5 years ago

    I've just written a post on using git with suggested branch strategies.

    Firmware Version Control with GitHub part 1: Branch Strategy for New Features

    You may or ( - hey internet image - ) may not like the solutions. And I hope I can learn from critique.

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Cancel
  • balearicdynamics
    balearicdynamics over 5 years ago in reply to Jan Cumps

    I missed your post. Let me see how it matches with what I am already doing. Sure you have a better pragmatic use of Git than me.

     

    Enrico

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • Jan Cumps
    Jan Cumps over 5 years ago in reply to balearicdynamics

    I was hoping you'd have a better approach than me. Anything that can simplify the work is welcome.

    Also anything that makes it more complex  image...

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • Jan Cumps
    Jan Cumps over 5 years ago in reply to balearicdynamics

    balearicdynamics  wrote:

     

    ...  pragmatic use of Git ....

     

    Enrico

    That is what I am focusing on. Use it as a real help. With the lowest complication level possible.

     

    In my job I have to deal (and love to deal) with formal steps, such as code review and code acceptance. I have built them into my blog.

    But for my job, for my open source work here, and everywhere, I try to keep it to an adaptable complexity level.

    Where I can introduce the ways of working to someone new in half an hour.

    And where I don't risk that people become averse or afraid.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Cancel
  • balearicdynamics
    balearicdynamics over 5 years ago in reply to Jan Cumps

    Jan, it is great that this is normal for you. The point is this. I love the use of Git to keep track of my own works. SO I use it by 2013, at least as a constant working tool. And in these past years, I always changed (or optimized, or refined) my git adopted strategy for a similar reason you mention. But I have always worked alone, I mean, my projects (job and not) are always been managed under Git but I always found difficult with the developers to accept this methodology. Developers in big companies when there is not an official methodology rarely adopt a way like keeping track of problems and bugs. So my collaborative experience with Git only relates to the big Open Source projects but in this case, the strategy is right for large teams where every branch of the whole project should be kept under control but is oversized and redundant for small teams (1-5 developers). So I see that you have a more pragmatic approach that has a lot of useful suggestions and advice I can refer to adapting a complex strategy to simplified team management.

     

    Enrico

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • Jan Cumps
    Jan Cumps over 5 years ago in reply to balearicdynamics

    balearicdynamics  wrote:

     

    ... But I have always worked alone, I mean, my projects (job and not) are always been managed under Git but I always found difficult with the developers to accept this methodology. Developers in big companies when there is not an official methodology rarely adopt a way like keeping track of problems and bugs. ...

    It's a people skill. I work in a > 250.000 employees company.

    Then most of the resources I work with are changing external parties that I will never see in person.

    That's why I levitate to a simple, explainable, defendable, working process.

    If you forget to take any player or stakeholder with you, it's not going to happen.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • Jan Cumps
    Jan Cumps over 5 years ago in reply to balearicdynamics

    balearicdynamics  wrote:

     

    ... But I have always worked alone, I mean, my projects (job and not) are always been managed under Git but I always found difficult with the developers to accept this methodology. Developers in big companies when there is not an official methodology rarely adopt a way like keeping track of problems and bugs. ...

    It's a people skill. I work in a > 250.000 employees company.

    Then most of the resources I work with are changing external parties that I will never see in person.

    That's why I levitate to a simple, explainable, defendable, working process.

    If you forget to take any player or stakeholder with you, it's not going to happen.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
Children
  • Jan Cumps
    Jan Cumps over 5 years ago in reply to Jan Cumps
    That's why I levitate to a simple, explainable, defendable, working process.

     

     

     

    I translated this in a set of fixed commands, easy to do for anyone.

    First of all, we aligned on the branch and pull request naming convention. It's based on a request number that's known to everyone when something/anything needs to be done.

     

    When a developer starts:

    mkdir <request number>
    cd <request number>
    git clone https://<URL>
    cd <repositoryname>
    git checkout -b <request number>
    git push --set-upstream origin <request number>

     

    So the request number is know. That's a given in my org. The URL and repository name are a fixed thing.

    Those are fixed attributes of the repository you are working on.

    This means that a developer - even if the GIT skills are standard - can execute 6 repeatable commands to prepare a working directory to work on a feature.

    There are no decisions to be taken, no fuzzy parts. Just a repeatable activity.

     

    Then, while the developer is working:

    Do development work in that freshly created directory.

    At any (many!) time, the work can be synced to the remote repository.

    $ git commit -a -m "<request number> added new attribute"
    $ git push

    Again, no decisions to be taken, no fuzzy parts. Just a repeatable activity.

     

    Only if new files are added, there's an additional command:

    $ git add *

    Whenever a developer needs to add a new module, I set a session to explain how the add commands work. And I explain the .gitignore part and ask attention for temporary files in the working directory.

    Because we talk, I'm aware on who has a duty to introduce new modules / source files.

    Because it's easy to unexpectedly add unwanted files in a repostitory (.tmp and .bak and .mycopy files are annoying. Files with user names and passwords are a drama) - it's good to have the talk.

    Either learn how to remove unwanted files before executing the git add, or learn how git add can be used to only add a specific file or directory. Or if needed, learn how to maintain .gitignore.

     

    Then, when development, documentation and technical unit tests are done, the developers use a step-by-step (short!!! simple !!!) guideline to create the pull request.

    The repo owners are trained to do the right validations before approving and merging.

    Developers are requested to delete the temporary working directory on their PC once the pull request is accepted. To avoid confusions or goof-ups later.

     

    Project developers get an additional training, because they don't work on the master branch. Their process is the same but they don't use the master branch.

    This is again repeatable. Bu because devs may get requests from projects and from live code issues, talking helps. There's a decision to be made on what branch to clone from and what branch to create a pull request for.

    Up front sessions avoid mistakes later.

     

     

    All is focused on No Magic, No Surprises. Repeatable steps.

    It also reflects how I prefer to use Git and GitHub: as little complexity as needed to get the job done. No geek credits required. Just be able to perform repeatable activities.....

     

    Discuss below image

     

    git add

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Cancel
  • colporteur
    colporteur over 5 years ago in reply to Jan Cumps

    Great summary J. I copied and pasted it to my note book for my next git effort.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube