background preloader

How to: Change / Setup bash custom prompt (PS1)

How to: Change / Setup bash custom prompt (PS1)
So how do you setup, change and pimp out Linux / UNIX shell prompt? Most of us work with a shell prompt. By default most Linux distro displays hostname and current working directory. You can easily customize your prompt to display information important to you. You change look and feel by adding colors. In this small howto I will explain howto setup: a] Howto customizing a bash shell to get a good looking prompt b] Configure the appearance of the terminal. c] Apply themes using bashish d] Howto pimp out your shell prompt Prompt is control via a special shell variable. PS1 – The value of this parameter is expanded (see PROMPTING below) and used as the primary prompt string. How do I display current prompt setting? Simply use echo command, enter: $ echo $PS1 Output: \\u@\h \\W]\\$ How do I modify or change the prompt? Modifying the prompt is easy task. touch me : Let us try to set the prompt so that it can display today’d date and hostname: PS1="\d \h $ " Output: Sat Jun 02 server $ Related:  GIT

GUI Clients Git comes with built-in GUI tools for committing (git-gui) and browsing (gitk), but there are several third-party tools for users looking for platform-specific experience. Only show GUIs for my OS (Linux)0Linux GUIs are highlighted below ↓ GitHub DesktopPlatforms: Windows, MacPrice: Free GitX-dev Platforms: MacPrice: Free SourceTreePlatforms: Mac, WindowsPrice: Free SmartGitPlatforms: Windows, Mac, LinuxPrice: $79/user / Free for non-commercial use GitUpPlatforms: MacPrice: Free gigglePlatforms: LinuxPrice: Free GitKrakenPlatforms: Windows, Mac, LinuxPrice: Free ForkPlatforms: MacPrice: Free TowerPlatforms: Windows, MacPrice: $79/user (Free 30 day trial) GitboxPlatforms: MacPrice: $14.99 Git ExtensionsPlatforms: WindowsPrice: Free git-colaPlatforms: Windows, Mac, LinuxPrice: Free GitEyePlatforms: Windows, Mac, LinuxPrice: Free gitgPlatforms: LinuxPrice: Free

gitk Documentation To control which revisions to show, gitk supports most options applicable to the git rev-list command. It also supports a few options applicable to the git diff-* commands to control how the changes each commit introduces are shown. Finally, it supports some gitk-specific options. gitk generally only understands options with arguments in the sticked form (see gitcli[7]) due to limitations in the command-line parser. rev-list options and arguments This manual page describes only the most frequently used options. --all Show all refs (branches, tags, etc.). --branches[=<pattern>]--tags[=<pattern>]--remotes[=<pattern>] Pretend as if all the branches (tags, remote branches, resp.) are listed on the command line as <commit>. --since=<date> Show commits more recent than a specific date. --until=<date> Show commits older than a specific date. --date-order Sort commits by date when possible. --merge --left-right Mark which side of a symmetric diff a commit is reachable from. --full-history --simplify-merges

Documentation Documentation Reference Reference Manual The official and comprehensive man pages that are included in the Git package itself. Quick reference guides: GitHub Cheat Sheet (PDF) | Visual Git Cheat Sheet (SVG | PNG) Book Pro Git The entire Pro Git book written by Scott Chacon and Ben Straub is available to read online for free. Videos See all videos → External Links The External Links section is a curated, ever-evolving collection of tutorials, books, videos, and other Git resources. Setting up a repository - git-init This tutorial provides a succinct overview of the most important Git commands. First, the Setting Up a Repository section explains all of the tools you need to start a new version-controlled project. Then, the remaining sections introduce your everyday Git commands. By the end of this module, you should be able to create a Git repository, record snapshots of your project for safekeeping, and view your project’s history. git init The git init command creates a new Git repository. Executing git init creates a .git subdirectory in the project root, which contains all of the necessary metadata for the repo. Usage git init Transform the current directory into a Git repository. git init <directory> Create an empty Git repository in the specified directory. git init --bare <directory> Initialize an empty Git repository, but omit the working directory. Discussion Compared to SVN, the git init command is an incredibly easy way to create new version-controlled projects. Bare Repositories Example git clone

Getting your project on GitHub · GitHub Guides Software is at the heart of GitHub—and code is the DNA of software. Chances are if you’re joining, you’ve got some code that you might want to push to GitHub. And that’s a fantastic idea! Here are some great reasons to push projects to GitHub: Version Control — Everything on GitHub is stored in Git, the best version control system around. Once your project is on GitHub, we provide a URL for every file in your project. We use the words Git and GitHub a lot in this article, so let’s clarify what they mean. Git — The version control tool that GitHub is built on top of. GitHub Desktop GitHub Desktop is the easiest way to get code on GitHub.com. You can download GitHub Desktop for Mac and Windows. Set up your project in GitHub Desktop The easiest way to get your project into GitHub Desktop is to drag the folder which contains your project files onto the main application screen. If you are dragging in an existing Git repository, you can skip ahead and push your code to GitHub.com. Celebrate!

Hello World · GitHub Guides The Hello World project is a time-honored tradition in computer programming. It is a simple exercise that gets you started when learning something new. Let’s get started with GitHub! You’ll learn how to: Create and use a repository Start and manage a new branch Make changes to a file and push them to GitHub as commits Open and merge a pull request What is GitHub? GitHub is a code hosting platform for version control and collaboration. This tutorial teaches you GitHub essentials like repositories, branches, commits, and Pull Requests. No coding necessary To complete this tutorial, you need a GitHub.com account and Internet access. Tip: Open this guide in a separate browser window (or tab) so you can see it while you complete the steps in the tutorial. Step 1. A repository is usually used to organize a single project. Your hello-world repository can be a place where you store ideas, resources, or even share and discuss things with others. To create a new repository Click Create repository.

Create new repositories on server in GitHub way, using simple bash script | Codingo Tuts Each developer will inevitably come to the moment when he needs to upload his work to remote server. There are many options how you can accomplish this, you can use some FTP/SFTP client like FileZilla, rsync, scp or Git. I have been using FTP clients for a long time when I was starting, then I moved to terminal programs like scp. Git Workflow script in action. Git came as only viable solution for all of these issues. Basic Git workflow for me is when I have local repository on my desktop, and some remote repository on live server where only I push commits. Few months ago I found really good explanation how to setup this basic Git workflow here. Git needs to have intermediate hub folder cause it does not allow pushing changes directly to checked-out branch of live repository (folder). Also it is good idea to move away this Git hub from public folder, so it can only be accessed by authenticated users. #! Uploading script to remote server via scp SSH connection shortcuts

Oh, shit, git!

Related: