Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other Ubuntu Help

  • This topic is empty.
Viewing 15 posts - 1 through 15 (of 44 total)
  • Author
    Posts
  • #182368
    Erik
    Participant

    I have Ubuntu and installed git and now I have no idea how to find it or open it.

    Update: I Alt +Ctrl+T and opened terminal and entered sudo apt-get install git-corethen it asks for my password.. but when I try to type it in nothing happens.. I mean my keyboard not work then.

    #182369
    nixnerd
    Participant

    He he he. This is awesome. Open up your terminal. Type the following:

    cd /home/erik
    mkdir test
    cd test
    touch test.html
    git init
    git status

    This is how git works and how you should learn. What you’re doing here is changing into your user directory… which you should already be in. Also, the file path may be SLIGHTLY different in Ubuntu. If you want to know where you are at any time… just type pwd in the terminal. That stands for “Print working directory.”

    Anyway, then you’re making a directory called test. Then, you’re changing your directory to the new one you just created. Then you’re making an empty file called test.html. Then you’re initializing git so it can track all the stuff in that directory. Then, you’re having git show you the status. You should have a few items that need to be added to your head.

    To track these items… type this:

    git add .
    git commit -m "My awesome commit message."

    Come back and post when you’ve done all that. Congrats… you’re now a basic git user!

    #182370
    nixnerd
    Participant

    To clarify… the reason you can’t ‘find’ Git is because Git is a program you don’t see. That is to say, it has no graphical front-end with buttons and shit. Git was always meant to be a command-line utility. Now… you can get yourself a graphical front-end to handle git for you… so that it functions like something more akin to Dropbox. I think a few people on these forums do it that way. People I respect do it that way. But… as long as we’re spit-balling, I’ll give my opinion: That way sucks. It is my very humble opinion that you should learn Git the hard/real way.

    I’m pretty sure there’s at least 4 people on these boards that would agree.

    #182371
    Erik
    Participant

    @NIX I Got this..

    Initial commit

    Untracked files:
    (use “git add <file>…” to include in what will be committed)

    test.html
    test/

    nothing added to commit but untracked files present (use “git add” to track)

    #182373
    nixnerd
    Participant
    git add .
    git commit -m "My awesome commit message."

    git add . means track everything in this directory. A period in UNIX-like system usually means everything. If you only wanted to track a few files… you’d need to specify them. Once you’ve added them to your head, you need to perform your first commit. You got EXACTLY the message you were supposed to.

    Great job!

    #182374
    Erik
    Participant

    I keep getting this darn thing: [sudo] password for erik:

    but I can’t enter anything

    #182376
    nixnerd
    Participant

    On another note… look how fast you’re learning! You came in here a few weeks ago and didn’t know shit about shit. Now, you’ve installed Linux and you’re learning the CLI! Nice!

    #182377
    nixnerd
    Participant

    Oh wow… that’s weird. You really shouldn’t need to invoke sudo to perform git commands… provided you’re in the right directory. Type pwd and tell me where you are in the system.

    #182378
    Erik
    Participant

    I’m attempting to follow these 2 sites

    WPScan

    Git

    #182379
    nixnerd
    Participant

    Right… but where are those directories locally? When you open up your terminal… you’re somewhere whether you know it or not. We need to find out where you are. Chances are… if you’re anywhere other than the /home directory… you’re going to need root privileges to do anything.

    #182380
    Erik
    Participant

    pwd

    I get:

    erik@erik-Aspire-7551:~$ pwd
    /home/erik
    erik@erik-Aspire-7551:~$

    #182381
    nixnerd
    Participant

    now type ls and see if the directory you created is in there.

    #182382
    nixnerd
    Participant

    erik@erik-Aspire-7551:~$

    On another note… I love how Ubuntu auto-assigns the longest hostnames ever. Ha ha ha. We’ll help you change that if you want. But… you can’t be darth@deathstar. That’s my rig. Well… you could but you’d be a copycat :p

    #182383
    Erik
    Participant

    erik@erik-Aspire-7551:~$ ls
    Desktop Downloads Music Public test
    Documents examples.desktop Pictures Templates Videos
    erik@erik-Aspire-7551:~$

    #182384
    Alen
    Participant

    but I can’t enter anything

    When you get asked to enter sudo password, when you start typing, there will be no feedback (you will not see anything)… just type the password and hit enter.

Viewing 15 posts - 1 through 15 (of 44 total)
  • The forum ‘Other’ is closed to new topics and replies.