OpenHackUtsav @VAST 2018
A Hacktoberfest program..
This session is lead by Ambady Anand, a Software developer, Free Software Enthusiast and Privacy Advocate.
Before going to use git we want to check whether your system has git.
For checking whether you have git type the following,
$ git --version
For installing git in your system
$ sudo apt-get install git
Then open up the terminal and update your git account.
$ git config --global user.email "username@example.com"
$ git config --global user.name "Your Name"
For clone a git repository use,
$ git clone https://github.com/....
For checking the status of your edit,
$ git status
For adding your edit to the origin/master branch,
$ git add .
For committing your edit to the master branch,
$ git commit -m "Some random message"
For pushing your code to remote server,
$ git push
If you got conflict error the update the git repository by,
$ git pull
and call
$ git mergetool
for fixing the conflict.
Use the default conflict resolver meld
for graphical conflict resolving.
Here were are going to do some action in Github.
The main steps in done in this program
- Fork the repository
- Edit the necessary files/Add new ones
- Update your edits
- Create Pull Request (PR)
First fork the repository from the source or from group leader by clicking on the fork button on the right-most part of the repository.
Now you have got a duplicate of the repository.
Now we need to save our repository to our local system or computer. We need to copy the URL of your repository and do following command.
$ git clone https://github.com/examplerepo
Now we have successfully saved the repository to your system.
Then make a duplicate of index.html
file as gimp.html
file by using the below command. You can use your own filename but be careful that it must be a .html
file.
$ cp index.html gimp.html
Edit your files by using text editors like gedit,sublimetext,etc.
It is recommended to commit every edits you do as it will easier for you to return to previous code. So for committing your edits do the below code.
$ git add .
$ git commit -m "Edited file!!"
After editing your file, we now have to update your repository in the remote server ,i.e in Github's server. For this we use push
command.
$ git push
After this , we have successfully updated the repository in the server.
Note : At this stage you may have encountered an error due to mail privacy. To solve this just uncheck the Email privacy in the Email Tab in your Profile Settings. For more info regarding this error, click here.
Now we have reached to the last and important stage of our session. Creating pull request is basically adding your new features to the master branch of the repository.
To create PR, click on 'New Pull Request' in th 'Pull Request' Tab in your repository. Then compare both of your edits and apply for PR. Now a dialog box will come and add some details. Then click submit.
Now you have made your Pull Request or simply your PR !!
This section mainly deals with the technical side of hosting a website. This session was led by Biswas, an active S7 C.S.E student from G.E.C Palakad and a Web developer based on Django framework in Python. He is the main hero during Kerala Floods and the brain behind keralarescue.in.
The main framework/services used for development of the website was,
He also described about the challenges faced by him on the Flood days and also gave a brief introduction to the above services/framework used.
This notes are written by Abhijith Sheheer , C.S.E student in Vidya Academy of Science and Technology. The application used here Typora.
Made with ❤️ and Markdown