Sudo

  • Random
  • Archive
  • RSS
  • Ask me anything
  • Submit

Using ‘git remote’ to add a remote origin manually

Before reading this post please understand what ‘local’ and ‘remote’ repositories in git means. This is very important to understand difference between local and remote git repositories.

In simple words,

local git repository is a directory which exists in your computer.

remote git repository is the directory which exists in your github  account ( or say bitbucket ). 

Suppose say you have some day-to-day-use shell scripts in your computer ( say in $HOME/.scripts/ directory ) and you want to store them into a new  repository ( this remote repository doesn’t exist yet ) in your Github account.

Note: You are not cloning a remote git repository into your machine here at all. You are just pushing your already existing local scripts into a newly created remote git repository using ‘git remote’.

Do the following things

  • Go to your github page and create a new repository called ‘scripts’
  • Now go to your local directory which contains the scripts ( which is in your machine ) and initiate a new empty local git repository using this command
    git init
  • Now add the file contents to index using
    git add *
  • Commit the changes
    git commit -m “adding scripts”
  • Since this local_repository/scripts_directory is not a clone of any remote git repository yet, no remote origin exists for this local directory. You have to add the manually created ‘scripts’ directory as remote origin ( See first bullet )
    git remote add origin https://github.com/<github-username>/scripts.git
  • Last step is to push the local scripts to remote repository
    git push -u origin master

Now go to https://github.com/<github-username>/scripts

Voila !!!

    • #git remote origin
  • 1 month ago
  • Comments
  • Permalink
  • Share
    Tweet

pacman error: failed to commit transactions (conflicting files)

You may get the above error when you are upgrading a package or installing a new package.

Suppose you get an output like this:

error: could not prepare transaction
error: failed to commit transaction (conflicting files)
package: /path/to/file exists in filesystem
Errors occurred, no packages were upgraded.

There is a simple trick to overcome this.

run pacman -Qo /path/to/file

 If this file is owned by any package, then file a bug report. Otherwise, rename the file ‘which exists in your file system’ and re-issue the update or install command. Everything will be fine.

    • #archlinux
    • #pacman
    • #conflicting
    • #files
    • #error
    • #commit
    • #transactions
  • 1 month ago
  • 1
  • Comments
  • Permalink
  • Share
    Tweet

A few words on Arch Linux

I use KDE .

I always wondered that, whenever I visit IRC, why most of the hackers out there criticize about using Kubuntu (A debian based KDE distro). Most of them use Arch Linux and of-course some use Gentoo also. I  had used ArchLinux + KDE earlier, properly configured for my need and taste. But I had to say good bye too soon as I screwed my laptop. So never had a chance to properly enjoy Arch Linux.

And I don’t know, I became too obsessed with Kubuntu than any other KDE flavors. And never used other distros since then. Trust me, I hear good things about Linux Mint. But never even tried it.

Over the time, I started getting irritated with Kubuntu. There are several problems occur while using it. First of all while installing lot of garbage also get installed. You never use those apps in your lifetime. Then why install it ? Also removing applications one by one sitting whole day is also not possible.

There are few  annoying  problems. Heating and fan speed. I installed ATI proprietary drivers. Then tried some more tweaks. They all  worked for few days. But again started giving trouble. I could hear my laptop fan sound over my ceiling fan :D.

Next comes LCD brightness -  battery monitor. I must say battery monitor sucks in Kubuntu. If you use battery monitor ( which resides in system try ) to control display brightness. It doesn’t hold still. It was irritating while I watch videos. Of course there is some trick to hold display brightness at constant desired level. ;) But it also started not working after a while.

And there are much more.

I finally switched to Arch Linux a few days ago.

Now my laptop doesn’t heat much. I can not hear my laptop fan’s sound while ceiling fan is running. It do not consume too much of RAM, there is no inconsistency  in display brightness. Boots up and shuts down too quickly. Everything is suddenly fine and my system is stable. It works the way I want.

Now I am going to tell a few words about Arch Linux

Arch Linux is cool. It just works the way I want. Everything runs fine in Arch Linux. There are lots of tricks and tweaks to make your Desktop works like the way you want. No unnecessary cluttering, heating, display brightness and many more. 

Arch Linux  follows a Rolling Release model of software upgrades. So you always be the first person to enjoy new stable version of a software when it is released, by using a single command.

You can install official packages and user builds using Pacman. You can use yaourt to install packages from AUR.

I would like to give a few tips for getting started with Arch Linux

  • Follow Arch Linux beginner’s guide for installation. It’s great for beginners.  
  • Before installing Arch Linux please make sure that you have a good internet connection, in case if you want to install a full KDE  package or any other.
  • Make a note of this. If you have tried to install ArchLinux an year ago on your laptop, believe me, you will love the wifi-menu thing while installing now :)
  • Arch Linux is always best for usage with a lightweight desktop environments. If you are such a person, please do not install a Desktop Environment at all. Just use ArchLinux + a Window Manager like Awesome WM or Openbox. Both are awesome. But in my case, I like to use KDE plasma workspace. So I use ArchLinux + a base, minimal installation of KDE desktop.
  • The best thing is, while installing  Arch Linux, you are free to choose whatever you want to install ( of-course dependencies are  necessary and must). No need to install all the garbage you don’t want and don’t need.
  • I suggest to use wicd for network managemment
  • Always look for solution in the Arch Wiki to get rid of your problems. Its the best guide I have ever seen. Its neat, handy and almost complete. You will get solution to most of your troubles in Arch Wiki itself.

 Just try it for a few days. All you need is ArchLilux .iso file, a USB stick, A day to spare and the Desktop Environment of your choice.

So in my opinion, your system should be in The Arch Way.

image

PS: Even Gentoo is great. My friend uses it. I think, it is much more cooler than Arch Linux if you are lucky and you know how to make use of forums and IRC when you are a beginner and become an expert in Gentoo. But all you need is PATIENCE and a good CPU. Because Gentoo installs a software by downloading necessary source code of the software you want to install and dependencies and compiling  them locally on your machine. So better CPU, better installation speed.

Believe me. You will learn a lot about Unix systems using Arch Linux or Gentoo

    • #archlinux
    • #gentoo
    • #KISS
    • #thearchway
    • #linux
    • #install
    • #kde
  • 2 months ago
  • 1
  • Comments
  • Permalink
  • Share
    Tweet

Mount ntfs partitions in rw mode in arch linux

Trouble mounting your ntfs patitions in arch linux ?? Use ntfs-3g . Its an open source implemetation of Microsoft’s NTFS which includes read-write support. Its super cool. Find your ntfs partitions UUID by running lsblk -f
Remember, you have to create a mount point in /run/media/user1 before editing /etc/fstab

for e.x.  # mkdir /run/media/user1/Windows

Then edit your /etc/fstab. Add a line.

# Mount internal windows partition with linux compatible permissions, i.e. 755 for directories (dmask=022) and 644 for files (fmask=133)
UUID=<uuid-of-ur-ntfs-partition> /run/media/user1/Windows ntfs-3g uid=1000,gid=1000,dmask=022,fmask=133 0 0

By this you can mount ntfs partitions with Linux compatible permissions i.e. 755 for directories and 644 for files using dmask=022 and fmask=133

    • #linux
    • #archlinux
    • #fstab
    • #ntfs
    • #ntfs-3g
    • #mount
    • #read-write
    • #rw
  • 2 months ago
  • Comments
  • Permalink
  • Share
    Tweet

programming is terrible: How to parse Ruby

programmingisterrible:

If you want to parse Ruby, I wish you luck—there isn’t any documentation or a formal grammar that fully describes the language. Instead, you have to look at the source code to truly understand Ruby’s syntax. This is where the nightmare starts.

Take a look a Ruby’s parser, defined in parse.y….

  • 3 months ago > programmingisterrible
  • 16
  • Comments
  • Permalink
  • Share
    Tweet
← Newer • Older →
Page 1 of 4

About

Avatar A place where you can find latest buzzs, gadget reviews, humour, music and dearly Linux stuffs :)

Raveendra Bhat

  • Write to me:
    me AT raveendra DOT in
    me@raveendra.in


Follow Raveendra Bhat on Quora

Me, Elsewhere

  • @RaveendraBhat on Twitter
  • Facebook Profile
  • raveendra-bhat on Soundcloud
  • Google
  • Linkedin Profile
  • raveebhat on github

Following

I Dig These Posts

  • Post via trymaadi
    VV Puram Chat Street!

    A lazy day it was. Got a phone call from a close friend of mine. And the next thing she told me put a smile on my face :D Ah!...

    Post via trymaadi
  • Post via localparty
    Thin guy means you will make fun is it?

    You are always treating the thin guy like a patient. You are thinking arey, he is thin only no, he won’t say...

    Post via localparty
  • Post via localparty
    Mind your language, not mine

    Dear English Pundit,

    As I am suffering from ‘horrible English’, I kindly request you to go to hell. You are really...

    Post via localparty
  • Post via localparty
    Eat junk food

    Boss, how long you are going to live? In such a short time, why you want to restrict yourself and not eat any of the awesome junk...

    Post via localparty
See more →
  • RSS
  • Random
  • Archive
  • Ask me anything
  • Submit
  • Mobile

raveendra.in. Effector Theme by Carlo Franco.

Powered by Tumblr