Showing posts with label Git. Show all posts
Showing posts with label Git. Show all posts

Friday, 28 July 2017

Unknown

FOSSWave event in Coimbatore

What is FOSSWave?

WE ARE BUILDING A STRONG COMMUNITY

It's a place where you can learn, teach, enrich and be part of FOSS revolution!
It is an initiative to 
  • spread FOSS knowledge
  • connect with FOSS minded people across the globe
  • help students contribute to FOSS projects, tools, and technologies
  • Help students become industry ready.
In addition to sharing knowledge, FOSSWave speakers also take part in organizing events and speaking in conferences across the Globe.
The FOSSWave Community consists of active contributors from across the globe. It includes both paid employees and volunteers who work towards the goals set forth in the FOSS Revolution.

Special thanks to (in no particular order)

  • Premananth S: for helping us to grow, touch more lives and connecting us to KGISL
  • Sudharsan Rajendran: For being a wonderful host and making sure that the event went ahead smoothly. He put in a lot of hard work.
  • Prakash Mishra: or being an amazing co-speaker and traveling with me.
  • Super enthusiastic participants for getting involved in our talk and discussing FOSS with us.

     About the event

    I had stopped writing about the events I speak in..but this was different.
    A few days ago, I was invited by Prem to NASSCOM to give a brief talk on FOSS and trending technologies.
    Prem is doing a great job there by putting his effort in helping students from Tier2 and Tier3 cities. Around 20 of very enthusiastic students were selected and invited to Bengaluru to take part in such events. Mine was one of them. I planned to conduct a GitHub session after Intro to FOSS and brief about Fedora project.
    The event was very successful with amazing feedback.
    Just a picture with GitHub stickers that we distributed

    We (Sumantro, Prakash, and Smit) introduced FOSSWave to Prem and he loved the initiative.
    After few days Prakash and I got an invite to address few more super enthusiastic student in Coimbatore, Tamil Nadu. This workshop was for 2 days.
    We had suggested not to have more than 35-40 participants as I always prefer an interactive session rather than a talk where everyone gets bored.
    20 students were selected from KGISL and rest 15 from different colleges from all over Coimbatore.
    Everything from traveling to accommodations was sponsored by KGISL.
    We arrived Coimbatore at around 11 pm and Sudarshan was there to receive us. We were taken to a studio apartment which was full of all the facilities.
    Because of some other important tasks, I never got time to make slides[1] so I decided to do that. It took more time than expected as I was trying to avoid putting too much of complex and complicated stuff. 
    We got up at 5:30 as the event was from 9:30 and breakfast for us were arranged at 8:00. 
    The moment I stepped out of the apartment, I could feel the fresh unpolluted air. The weather was same as of Bengaluru's but a cleaner version. 

    Just a picture of a very huge college

    In the first session, we started with FOSS and It's philosophies and soon moved to Fedora project and 'How to contribute to Fedora QA'

    We covered the following topics during the time:
    1. FOSS and Fedora
      1. What is FOSS?
      2. Why FOSS?
      3. Getting industry-ready
    2. Discussions around diversity and contribution spectrum
      1. All FOSS projects are open-sourced: so contribute anywhere
      2. All contributors do not have to code; can be designers or can help in documenting
    3. How to start with FOSS
      1. Introduce yourself: let the world know who you are on mailing lists
      2. Every project has identity methods: Fedora has the Fedora Account System (FAS)
      3. What if you run into an issue? Use IRC!
    4. Fedora and contribution pathways
    5. start.fedoraproject.org
    6. apps.fedoraproject.org
    7. Fedora Docs
    8. Packaging (and using Bodhi)
    9. Fedora Magazine
    10. Recognition Model: Fedora Badges
    11. Creating Accounts (FAS, mailing lists, etc.)
    12. admin.fedoraproject.org
    13. For Fedora QA: all the people redirected to the QA mailing list
    14. Otherwise, shoot a mail to respective mailing list
    15. Freenode IRC webchat
    After this, we  gave participants a lunch break for 30 minutes and then started with GitHub

    Our talk covered some basics of Git and GitHub such as…
    1. What is version control?
    2. Need for a version control system
    3. Methods of version control
    4. What is the git, who developed it, and why you should use it?
    5. What is GitHub and why you should use it?
    6. Setting up and configuring git
    7. Stages of file tracking
    8. Creating a new organization and repository on GitHub
    9. Basic git commands: git status, git clone, git diff, git add, git commit, git push, etc.
    10. Hosting a static website on GitHub
    11. Forking and Cloning a project
    12. How to send PRs
    13. How to solve merge conflicts
    The event was until 6 pm in the evening. My plan to roam around couldn't be successful as I had no sleep last night and was very tired.

    *freshen up* *Dinner* and *sleep*
    But wait, I had to make Ansible slides :p
    Hopefully, I had my slides ready (from other events')

    The next day we started with SSH and Ansible
    We explained (with demo)
    1. Different terminologies
    2. What is SSH?
    3. Establish a passwordless ssh connection
    4. Introduction to Ansible
    5. Inventory files
    6. Introduction to Virtual Machines
    7. Some common modules like ping, command etc
    8. What are playbooks
    9. How to write playbooks
    And then, after question answer round, we wrapped up our session.
    It was a great workshop with the great audience and at a great place.
    We enjoyed our stay there :)

    [1]Slides' links




    Some photos from our trip: (If interested, click here)


    Read More

    Tuesday, 15 November 2016

    Unknown

    Basics of GitHub

    This post can be referenced by the students of I BCA A/B (Christ University)  who will be addressed by Prakash and me regarding GitHub and VM.

    If you know how to use GitHub, This is not for you.


    GitHub may sound complicated but once we understand it, it turns out to be no more than a simple social network. It is not very different from Facebook and Google plus. You sign up, sign in, upload projects, download projects, follow other users and many more things that make it very similar to a social network.

    What is Git & GitHub?
    Let's understand Git first. Linus Torvalds, the man himself created Git, the software that is same for GitHub as a kernel is for an OS. 
    • Git is a version control software. This is self-explanatory. It manages all the versions of a project. When we modify a piece of code, we usually over write it and thus, lose a working model. In case the new code breaks, rolling back is often very difficult.  
    • Let's assume a team is working on a project and everyone is editing the same file. If you are familiar with the race condition in OS, you can understand what I mean. When two or more member of the team try to modify a file at the same time, conflict occurs. If they are doing it at a different time, one may overwrite the code and thus deletes his part of code. git is the solution for the mentioned problem.
    Now GitHub. The only problem with Git is that you have to everything by using the command line (terminal / console / konsole). Here comes GitHub. GitHub provides a visual interface to help and manage the project. You can create an account here and it gives more of a social network feel. You can browse through users' profile, check their projects, download a copy of it to your profile or computer or alter it. No data will be lost.

    GitHub can be used without command line but there is a difference between using and understanding it. In this post, we will be working with git and GitHub using the command line.

    Terms to know:
    1. Repository : A directory where we can store our project.
    2. Version control: A solution to losing the track of modifications without creating multiple copies.
    3. Clone : downloading (cloning) any project to your local system.
    4. Fork : A copy of a repository. Allows to modify / edit code without affecting the original project.

    Steps to success:

    1. Create an account. It is same as creating any social network account. Throw in a valid user name, email id and a password to start.


    2. Install Git. if you are going to work in your computer with git, you need to install it. Use one of the following commands to install git.

    Fedora users
    $ sudo dnf install git-all

    Other Red Hat based Linux users
    $ sudo yum install git-all

    Debian based Linux users
    $sudo apt-get install git-all

    3. Configure your system to git. As we have already installed git in our system, to configure, just type
    $ git config --global user.name "your user name here"
    This is the user name git will use to credit commits. Now the email id that was just used to create GitHub account.
    $ git config --global user.email "your full email id  here"
    4. Create a repository. A repository is  also called "repo" in short. To create a new repository in your account, go to the '+' sign beside your username / profile picture in right-hand side upper corner. On clicking on the sign, from the drop down menu, select new repository.

    Now, It will prompt for a repository name. Fill it up. Just below that, add a bit of description about the repository or project (Optional).
    Further down to that, select public repository if you want to keep it public and free, or private if you want to keep it a secret (Paid).
    Just below that, don't forget to tick that check box that says initialize this repository with a README. Readme is just a text file that is used to store basic information about the project like About, collaborators, dependencies etc. Click "create repository" to proceed.

    As this is first-time hands on GitHub, I don't want to confuse everyone with making a local repository. We shall understand those concepts in next workshop.

    As of now, lets clone the repository so that we can modify it on our computer and then we will put it on the GitHub using the command line.

    Before cloning it, first, go to the directory where you want to clone your repository. Then go the repository you want to clone, and copy the link you get in [Clone or download section].

     To clone, use the link as given below
    $ git clone copied_link

     Here is an example of the commands mentioned above

    Now, in go in the directory, you will see the cloned repo. Now change the code, README.md etc in whatever way you want. 
    Let's say you want to add a text file in the repo, type $touch data.txt  and you have successfully added a file. you can modify it using any text editor and save it. What ever changes you have done, can be seen by typing
    $git status

    and it will show you all the modifications done.
    To add it to the repo as a part of it, type
    $git add .

    here [dot] means everything that has been changed. You can also mention just the file name you want to add. In our case, &git add data.txt
    Now time to save the changes. If you know even basic SQL, you know how to save (commit). Type
    $git commit -m "any comment"

    commit is the keyword that saves and -m passes the comment parameter that will be seen in time line when having an eagle eye on the versions of the project. 
    Now you have saved the file, lets merge it to our repo that is on GitHub. Type
    $git push

    It will prompt you to enter username and password, fill it and your files are up.
    You can go to your repo and check it.

    I have tried to keep the post as simple as i could. This is for students who have never heard / used git or GitHub. If you are interested in learning more, leave a comment.
    You can also visit this link to learn more about it.
    Read More