Monday, May 31, 2021

Git Commands

 Basic Git commands:


Once Git is installed in our system, we need to configure git in order to work efficiently. Git commands are important to learn as all of the git features are supported through command line, which otherwise GUIs might not be able to support.

Configure

1st thing after installing Git is to set username & email.

$git config --global user.name "arib_anwar22"
$git config --global user.email "hiareeb@gmail.com"

The global command will set this username and password throughout the system and this is stored in the git config file. We can also change the username/email for specific directory, for that use the git config and remove the --global to set specifics.

Once the username & email has been set we can see the settings,
$git config --list

Create Repository

To create a repository, go the the path of the project,$git init This creates a git repository

We can also clone an existing repository instead of starting from scratch,(even in this case we will have a git repository in an existing directory. To clone a git repository we need to have the link to the specific repository and then execute the following line, $git clone <link>
If we want to clone the repository into the directory named something else of our choice we can give the name as an additional argument.$ git clone https://freakster22.github.com/JavaTrial Project1 This will change the directory to be named as Project1.

Recording Changes to Repository

Since we have our own repo now, we might have started working on it, on different files all together, to know the status of the files, we have the git status command.$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working tree clean
git status gives the status of:

  • tracked as well as untracked files.
  • Informs the branch the user is on
  • Shows the files that were modified(tracked or newly added(untracked).

We also have the option to view a simplified, short status to check the files status,$ git status -s
$ git status --short

Tracking changes instead of files

If the status is too vagued for us, and we just want to know what exactly was changed, not just which files were changed, we can use git diff command,$ git diffThis command is to know, 

>>What we have changed but not yet staged.
>>What we have changed that is yet to be committed.$ git diff --staged This will tell us, what we have staged that is yet to be commmitted.
It is important to note that git diff by itself doesn't show us all the changes made since our last commit, it only shows the changes that are still unstaged. If we have staged all the changes, git diff will give no output

Staging Modified files

In order to begin tracking a new file, we use the command git add.This command stages the file, to stage all the files,$ git add *$ git add file.txt This will stage specific file.

Committing the changes

Finally, once we are ready and sure with all the changes we can commit these changes so that they don't get lost, for this we use git commit comand, simply running this command will take us to the text editor to add a commit message. Alternatively, we can skip this and give the message in the single command$ git commit -m "Added subheading"
One thing to remember is git commit will only commit the files that were in the staging staging area, that is, the files that were added using git add command. To skip adding files and directly committing(not-recommended) we can use -a option
$ git commit -a -m ' 'Add new benchmarks'
The git commit saves the changes to your local and we can't yet find it from a different location

Removing Files

To remove a file from Git we have to remove it from staging area, and then commit. git rm is the command for the rescue.

To unstage a staged file: Lets say we have changed two files and we want to commit them as two seperate changes, but accidently we type git add * and stage them both, on typing git status, we get the following msg advice, ->(use "git reset HEAD <file>..." to unstage)
The command is a bit strange, but it works.

Unmodifying Files

Suppose we realize we want to revert the files, and don't want the changes unmodify it — revert it back to what it looked like when you last committed(or initially cloned, or however you got it into your working directory). We get the hint from git status while showing the unstaged area (use "git checkout -- <file>..." to discard changes in working directoryLet us try that command;$ git checkout -- CONTRIBUTING.md $ git status On branch master Changes to be committed: (use "git reset HEAD <file>..." to unstage) renamed: README.md -> README It’s important to understand that git checkout -- <file> is a dangerous command. Any local changes you made to that file are gone — Git just replaced that file with the last staged or committed version.

That's all for this post, in the next post we will dive deeper and get to know advanced commands as well as how to push to Github

Wednesday, May 26, 2021

What is Git & GitHub


 

Introduction: Git, basically Git is Version Control system. This is the term that one would use to describe Git, but for a newbie like me this got me more questions than answers 🤔. Okay, to explain in basic terms let’s think of a scenario. Suppose, you are working on a Project, say Web Designing, with multiple components, modifying each component and finally running the project. This time you ran your project and see the component are out of order. Since you have made multiple changes you are unable to identify what exactly went wrong. Hence, the sane thing you do is go back to previous working component. This is called versioning.

Some people do it by locally saving the project each time it is modified with the version & Date-Time in different directories. While this can work, but there are dangers of losing this local back-up(nightmare!).


So, what is version control? In simple terms we can describe version control as a system to record and manage changes made to files and folders and it also to track changes made overtime, including adding, deleting, modifying files.


So, Git in a nutshell is distributed version control system, This means every team member has got a local store that contains all the source code of a project, including the complete history of all changes of all files. This store is called a ‘repository’ and it is located in a hidden folder ‘.git’ on the local file system.

 

"Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency."

Sunday, November 1, 2020

Indigo

“The best way to have good ideas is to have lots of ideas…and then throw the bad ones away.” 

~Linus Paulin
Involving yourself into psychology has it’s own benefits, a person ends up finding answers to questions they didn’t even know were questions in the first place. This blog was supposed to come a lot sooner, with no idea of any delay. The topic and the content kept on going around in my head for a long time but the push came a little later.

This idea emerged when I was out for a casual outing with my family for a swim, swimming gives a lot of free time for the head to make up stories, find solutions to problems and think about material that needs a lot of mental peace, Swimming offers that mental peace which I didn’t realize until that day.

I question, a lot. This is my question.

Why do some people have to be involved in order to make things right? For things to seem right? For things to stay mended? Act as if it was a missing piece even when it wasn’t?

Life is a maze that nobody will ever know how to solve because what builds up this maze is relationships, something people build on their own to survive and leave it on others to stabilize. A relationship between two people is never between two people, there is always a connecting source that evolves at the correct time. The backbone of some relationships is a third person.

When you first venture into it, the need is to be around, to be accepted with all the flaws, to be able to open yourself to experiences you could only have with that person and you get it, all of it and much more. It builds up, you explore it, find things you don’t think you need and dispose it. You question yourself, your choices, their choices, their attributes. You want to change them but not yourself. You think you’ve done enough, given enough, but have you?You think you’re keeping your happiness second, but are you? If seeking what you want, makes you happy then why can’t that happiness be out in the open? Is being selfless the only pardon to your actions because you think you suffered for long and you deserve to be happy for a while?

To be the mid way of a relationship is to have the power to know what love can do, if not between two people, it stays intact because the third one won’t give up. To be the mid way is to know, that’s the only way this love will stay. To be the mid way is to feel the love that wasn’t for you but everything you wished for, from the shooting star.

I look at these two beautiful, smiling faces and ask myself, if the only way they could be this happy is when I’m around, can I be selfless enough to hang around for them?

It’s half past six on a winter evening, the color of the pool complements my thoughts. It’s dark, it’s beautiful. It’s a mid way to my reality and mind’s eye. It’s Indigo.








Credit:https://za.pinterest.com/pin/575897871100568845/

Saturday, September 19, 2020

From Beans to Leaves

Bonjour les amis! With the pandemic going on, we never have had so much of free time ever. Away from all the time wasted in traffic and few precious moments spent together with family and friends, right now we're stuck with ourselves locked in our homes. The first few weeks were a headache with all the extra load given from work where you have to prove that you are actually working at home, so glad that passed away. Now with more and more time at home, scrolling through the explore page finding out the bright side of this pandemic I came across how our ecosystem is healing and the trees, birds and the wildlife is finally breathing, eventually living without the much restriction or boundaries to abide by. This made me think if I could make my home a better place and at the same time help in this healing process. So my quest to gardening began.

Aloe Plant that I got from Amazon
    Aloe Plant that I got from Amazon

I got on Amazon and ordered 3 pots and soil. Now I needed a plant. I started my research, "Aloe Vera" was my first choice. For plant 2 and 3 I decided to do my own hard-work. I took the easiest seeds to germinate, beans and lemon. Soon my accessories came and I was ready. As my Aloe Vera arrived I checked on my seeds and chickpea has already germinated. I was so happy seeing the start of what I had dream.

I started checking on Aloe everyday, wondering when will they start growing new leaves. For the bean seed I had potted it in soil since it had germinated. Post 3 days of my Aloe arrival, I checked my lemon seed, there was no sign of anything and I became uneasy. Checking online I came to know it would take almost 40 days for shoot to show up. After a week, the leaves of my aloe was starting to turn brown and bend at the tips. I had placed it in bright direct sunlight for 6hrs and it resulted in sunburn. Also checking online I came to know I should water it only if the soil appears dry. I have so much to learn.

Aloe and rubber

2 weeks passed and I was already irresistible, I gave up on lemon seeds, no no.. I did not throw them. I just left them to concentrate on others. Now even the online deliveries were restricted and I had a lot of soil left, so I took old bucket and jars and filled them. Now I just needed plants. I had 2 buckets and a jar. I started reading more and more articles on plants and how they behave how they grow. Reading helps you to know a lot and in turn take better care and steps when things aren't going in the right direction.

So I learnt the key is patience and thus, I got a few more plants to add my collection. Certainly it adds beauty to home. Well, I did the research and honestly it does not make much of a difference to the oxygen levels or even reducing the carbon emissions or filter the toxic gas. However, this should not stop you.

In this journey of growing plants, I encountered a lot of problems, life leaf falling off, turning brown, growth stagnant. These problems might mess you up since they are all the same, but eventually a few clicks online will save the greens.As a newbie, the problem I encountered was over-watering. I thought watering every now and then will speed up growth, end result: root rot! While my money plant grew in water bottle, my aloe and rubber plant needed much less water.

This journey definitely taught me patience, caring, as well as how each plant is different yet they all give immense happiness when they glow up green. I had to fight few gnats put some fertilizers frequently but all the work is worth it when you sip your coffee and breathe that fresh air. Let's reward you all with my collection:














PS: My lemon plant germinated, but not much of a progress, but after-all I've learnt patience. :D

Wednesday, September 16, 2020

Quarantine Thoughts

 Konichiwa Yuujin! It's that time of the year again. 15th September. 2yrs have passed since Dad passed away. I still have the reminder set for the exact time. Yepp... things have moved pretty much forward and as we wished it's been stable. I get reminded you him once in a while and yeah sometimes I cry to it too, but yeah that's mostly when I am alone. Don't want to bother people or more accurately put this way- Don't want people to bother me. We have still few paper-works pending. He used to take care of it all and maybe that's what spoiled me. I don't care much about those. The lockdown has been a great way of bonding, although I wish to be a more of a care-taker, however I do want Mummy to be seen as the high authority and keep things as they were. Just want everything to be gradual rather than sudden. My creativity has hit the rock bottom here. I don't know how but I don't find the time that looked so much easier when I used to be alone. Let's give staying awake till morning a shot, I mean what could go wrong.

Ahh.. and to be on the same ground, Covid still exist killing thousands if not millions every week. People now have been more casual to it. Of course you can't bind people more than the limits. I try my best to be more at home, while there are lots of forces pulling me out but the health of other members compels me to stay home & break the chain. This has actually impacted my health. I'm the brand ambassador of couch potato. With all the extra Quarantine calories, I am sure I've beefed up, My closer circle might agree that I need to, but exercise is equally important as against to getting belly fat. Sadly the park nearby is closed and running on roads with all the rash drivers here is too risky. I waiting for the park to re-open, well to be honest I'm procrastinating. I actually should get into action and this is why journal helps me, to introspect. Well, thinking of where I have been spending most of my time, I am basically left with my all time favorite game; CS:GO 💓 and the second one "YouTube".

For videos I have 3 goto apps, Netflix, Amazon Prime and YouTube.(well Instagram too, but I like stationary memes) Although not having Youtube Plus, my digital wellbeing says I'm a lot more active on Youtube than others. Lately astronomy has grasped me in all the mystery it beholds. How amazingly scientist have all worked on explaining the very basics of it and simultaneously unfolding new mysteries. How amazing a black hole is. The life of a star, the planets all around us and all that beholds in the millions of galaxies that exist that we may never even get a chance to see. It might be depressing but is at the very same time amusing.

Let's talk about the recent study of the planet existing in our very own Solar system. The neighbour planet Venus. How it can be possible for life to exist on Venus. I was reading an article that just a Telescopic view suggest that something might be alive on Venus right now. I have linked the article if you want to give it a read, all this makes me so enthusiastic on finding life, yet how insignificant we are. Not just time, but even our actions are relative. Few theories suggest that we might even be just a hologram and all these might just be a test or say a short dream or something of an amusement for the next intelligent species. Well... I could go on. These are the theories that makes life more meaningless to me. People point the key term "depression", but how can we actively work on something that would just be dust(or garbage value) in few decades or light years, who knows.. time is relative. The Holy books suggest, time somewhere else to be like 1 min = 7 years. How do you explain that. Or all the afterlife stories. Maybe this is just a test, where we are given new lives to live in set of rules only to observe how we behave and accordingly given the roles. The theories are unlimited and so is the universe and so are my thought, but alas time is bounded. Sayonara... Will come up with a proper article soon.

Saturday, July 11, 2020

Minimalism: the art of Living

Minimalism is beyond time, it is Stillness of Perfection.

When you think of Minimalism, you will most probably identify it with the root word minimal, which refers to reduced amount. Many people refer minimalism as a loosing substance and they indulge so much in loosing stuff around them that in the process, they start to loose themselves.

According to Cambridge Dictionary,  Minimalism is:
a style in art design, and theatre that uses the smallest range of materials and colours possible, and only very simple shapes or forms.

Minimalism has been a trend around for a while and while many do understand the basic concept, they either tend to go too far or altogether go in a different direction. I choose to believe minimalism to be related to minimizing, but more importantly de-cluttering your life.
Minimalism for me is a tool, rather than a way of living. People following a trend, incline to make mistakes since they focus more on the visual aspect rather than underlying mindset.


I was introduced to the concept of minimalism from the Stoicism that I came across while attending toastmasters session. I dived deep into stoic philosophies of Seneca and Marcus Aurelius. Stoicism is the Greek philosophies that depends on 4 virtues viz. Wisdom, Morality, Courage and Moderation. I was moved by their philosophies of how simple life can be and how complex we make it for ourselves.

"Moderation is the key"

    We might have heard this alot and might have even followed this once in a while, but reading the articles on Seneca made me realize what I was doing was wrong. While moderation is the key, but we look at it in a more materialistic way instead of spiritual. From there I was moved toward the true definition of Minimalism. For me minimalism is de-cluttering your life. Removing not just the stuff that you are in possession of but also removing your worries, anxiety , removing every other thing that hold you back. Removing toxic people and re-evaluating the things you need.

In order to live a luxurious life, you must also live a life simple, with less

Let's talk about materialistic aspect:

With the rise in digitization, shopping has never been this easy. This results in buying of things that we don't need, Stuff that just looks fancy in the pictures or we just need it for the showing purpose. The world has become more dominant of displaying their wealth by the items they possess in shorter amount of time. Buying any stuff from Amazon is just a matter of few clicks. With that power people profusely exploit and end up buying what they don't need and isn't necessary.

From a non-materialized aspect:

We end up possessing more worries, work loads, end up consuming more digital world. All this as a result ends up giving us the stress which we brought upon us. Remember, Less is more! When you start removing the unnecessary distractions, reducing digital time, taking time off your work, having a work-life balance; you end up with more time to yourself, more time with Family and more time enjoying life than stressing about it.

We always thought why time runs faster when we grow up, but never realize the time management and how minimizing could help you. Even from the materialistic aspect, if your desires to possess excessive stuff is held back and you only invest your time and money on stuff you need, you will have much more time in your hand and also cut back from work since the money that was being wasted is now saved.

Stoicism also taught me satisfaction, by removing clutters from our lives and living simple ones leads us towards a more happy lifestyle and this is what actual luxury is. A controlled life is driven by you not others or bits and pieces around you. Take minimalism as a tool not as a way of living, there are people who take it way to far and removing most stuff around them leaving them dissatisfied with life. The mantra of minimalism is lost there, minimalism is all about possessing of stuff that has a meaning to you, impacts your life and makes it beautiful.

Benefits:

The benefits of minimalism that I experience everyday is the first and foremost "Freedom". I have more space in my apartment, more space in my life, to chose my goals and not limit myself to the stuff in my life. I also get a sense of responsibility when I chose to possess only those that necessary, in a way I am saving the environment, also it helps me cut back my spending and save for the goals that I have planned or unplanned circumstances. Hence providing me with a peace of mind and happiness. The less clutter I have, the more focus I can infuse and prioritize. Two tips I have for my readers:

1. Do not put pressure on yourself, remember, Minimalism is a way of living, or a tool not an end goal.

2. Do not loose yourself or make it unattainable.

That's all I have to say from the experience Minimalism has brought in my life, I'll continue to practice this art but not be bound to it.

“No person has the power to have everything they want, but it is in their power not to want what they don’t have, and to cheerfully put to good use what they do have.” — Seneca

Peace ✌️

Monday, July 6, 2020

Life is it a Race?

“Life is a journey to be experienced, not a problem to be solved.” – Winnie the pooh

Life is not a race, they said
Take time and calm your mind,while themselves running.

If life isn't a race, why is time money?
If life isn't a race, why is the society judging?
If life isn't a race, why does a minor stumble so much frowned upon?
If life isn't a race, why does everyone runs until dawn?
If life isn't a race, why is taking a break such a big deal?
If life isn't a race, why isn't everyone following their zeal?
If life isn't a race, why are medals/prizes/certificates seen as success?
If life isn't a race, why is everyone chasing the next sunset?
If life isn't a race, why is everyone trying to be ahead?
If life isn't a race why are we always competing for a comfortable death?
If life isn't a race, why are there so many comparisons?

If life isn't a race, why are career path seen as 
running tracks where you can't even change lanes?
If life isn't a race, why do the rich get a head-start while the poor fails to lead?
If life isn't a race, why does money helps you pass all 
the drug test & weed?

I could go on and on... But life isn't a race, let me live life at my pace and judges, please be out of my face.

“Life is not a race but a pace we need to maintain with reality.”