• Home
    • View
    • Login
    This page
    • Normal
    • Export PDF
    • Page Information

    Loading...
  1. Dashboard
  2. Undefined Space
  3. Skara
  4. FAQ

Page History

Versions Compared

Old Version 28

changes.mady.by.user Erik Helin

Saved on Mar 26, 2020

compared with

New Version 29

changes.mady.by.user Erik Helin

Saved on Mar 26, 2020

  • Previous Change: Difference between versions 27 and 28
  • Next Change: Difference between versions 29 and 30
  • View Page History

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

If you are using the Skara CLI tools then and have the branch you want to publish currently checked out, then you can just run the command git publish

Can I see the currently checked out local branch in my Bash prompt?

Yes, add the following to your ~/.bashrc:

Code Block
languagebash
git_branch() {
    BRANCH="$(git symbolic-ref --short HEAD 2>/dev/null)"
    if [ "${BRANCH}" != "" ]; then
        printf " (${BRANCH}) "
    else
        printf ""
    fi
}
PS1="${PS1}\$(git_branch)"

For more information on how to customize your Bash prompt, see the Arch Linux wiki for a good reference.

Can I see the currently checked out local branch in my Zsh prompt?

Yes, add the following to your ~/.zshrc:

Code Block
languagebash
autoload -Uz vcs_info
precmd_vcs_info() { vcs_info }
precmd_functions+=( precmd_vcs_info )
setopt prompt_subst
PROMPT="$PROMPT\$vcs_info_msg_0_"
zstyle ':vcs_info:git:*' formats ' (%b) '
zstyle ':vcs_info:*' enable git

For more information, see the Pro Git book on Zsh.

GitHub

Configuration

How do I setup two-factor authentication (2FA)?

...

Code Block
languagebash
$ git clone github.com:openjdk/jdk
$ git clone github:openjdk/jdk
$ git clone gh:openjdk/jdk

Shell

Bash

Can I see the currently checked out local branch in my prompt?

Yes, add the following to your ~/.bashrc:

Code Block
languagebash
git_branch() {
    BRANCH="$(git symbolic-ref --short HEAD 2>/dev/null)"
    if [ "${BRANCH}" != "" ]; then
        printf " (${BRANCH}) "
    else
        printf ""
    fi
}
PS1="${PS1}\$(git_branch)"

For more information on how to customize your Bash prompt, see the Arch Linux wiki for a good reference. For more Git information in your prompt, see contrib/completion/git-prompt.sh.

Can I get auto-completion for git commands?

Yes, on all of GNU/Linux, macOS and Windows this is provided out of the box when you install Git. If you want to install auto-completion manually, run the following commands:

Code Block
languagebash
$ curl -o ~/.git-completion.bash https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash
$ echo 'source $HOME/.git-completion.bash' >> ~/.bashrc

Zsh

Can I see the currently checked out local branch in my Zsh prompt?

Yes, add the following to your ~/.zshrc:

Code Block
languagebash
autoload -Uz vcs_info
precmd_vcs_info() { vcs_info }
precmd_functions+=( precmd_vcs_info )
setopt prompt_subst
PROMPT="$PROMPT\$vcs_info_msg_0_"
zstyle ':vcs_info:git:*' formats ' (%b) '
zstyle ':vcs_info:*' enable git

For more information, see the Pro Git book on Zsh.

Can I get auto-completion for git commands?

Yes, Zsh ships with auto-completion for Git out of the box. Enable auto-completion by adding the following line to ~/.zshrc:

Code Block
languagebash
$ echo 'autoload -Uz compinit && compinit' >> ~/.zshrc
Overview
Content Tools
ThemeBuilder

Terms of Use
• License: GPLv2
• Privacy • Trademarks • Contact Us

Powered by a free Atlassian Confluence Open Source Project License granted to https://www.atlassian.com/software/views/opensource-community-additional-license-offer. Evaluate Confluence today.

  • Kolekti ThemeBuilder Powered by Atlassian Confluence 8.5.23
  • Kolekti ThemeBuilder printed.by.atlassian.confluence
  • Report a bug
  • Atlassian News
Atlassian
Kolekti ThemeBuilder EngineAtlassian Confluence
{"serverDuration": 1012, "requestCorrelationId": "2e28dc33648b80bf"}