How to Push to a GitHub Repository in IntelliJ

Image
1. Initialize and Connect the Git Repository # Run in the terminal from the project root git init git remote add origin https://github.com/[user]/[repository].git 2. Configure Git in IntelliJ Select VCS → Enable Version Control Integration . Choose Git and click OK . 3. Connect Your GitHub Account Go to File → Settings (on Windows) or IntelliJ IDEA → Preferences (on macOS). Navigate to Version Control → GitHub . Click Add Account ( + ). Select Log In with Token... and enter your GitHub Personal Access Token. 4. Add and Commit Files Go to VCS → Git → Add (or use the shortcut Ctrl+Alt+A ). Select the files you want to commit. Go to VCS → Commit (or use the shortcut Ctrl+K ). Write a commit message and click Commit . 5. Push Go to VCS → Git → Push (or use the shortcut Ctrl+Shift+K ). Click the Push button. Simpler Method (Using IntelliJ's Built-in Feature) Go to VCS → Share Project on GitHub . Set the repository name to vita-user-...

Setting Up Vim with vim-plug on Ubuntu

This walkthrough will guide you through setting up Vim with vim-plug, a minimalist Vim plugin manager, on your Ubuntu system. This setup will enhance your Vim experience with useful plugins and configurations.

Step 1:  Create Necessary Directories

First, we'll create the necessary directories for backups, swap files, and undo history.


  $ mkdir -p ~/.vim/backup ~/.vim/swap ~/.vim/undo


Step 2: Install vim-plug

download the plug.vim script from the vim-plug GitHub repository and save it to the ~/.vim/autoload/ directory.


  $ curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
    https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim


Step 3: Configure .vimrc

Copy the following settings into the ~/.vimrc file in your Linux (Ubuntu) user account


  " Basic settings
 
  set hlsearch " Highlight search results
  set nu " Show line numbers
  set autoindent " Enable automatic indentation
  set scrolloff=2
  set wildmode=longest,list
  set tabstop=4 " Set tab width
  set shiftwidth=4 " Set indentation width
  set expandtab " Use spaces instead of tabs
  set smartindent " Enable smart indentation
  set cindent " Enable C-style indentation
  set smartcase " Case-insensitive search unless uppercase is used
  set incsearch " Show matching results while typing search query
  set backspace=eol,start,indent " Enable backspace in insert mode
  set history=256 " Set command history length
  set laststatus=2 " Always display the status line
  set showmatch " Highlight matching parentheses
 
  " File encoding settings
 
  set encoding=utf-8
  set fileencoding=utf-8
  set fileencodings=ucs-bom,utf-8,cp949,latin1
 
  " UI settings
 
  set ruler " Show the cursor position
  set statusline=%<%l:%v\ [%P]%=%a\ %h%m%r\ %F\
  colorscheme codeschool " Set color scheme
 
  " Backup and undo settings
 
  set backup " Enable backup file creation
  set undofile " Save undo history to file
  set backupdir=~/.vim/backup// " Set backup file directory
  set directory=~/.vim/swap// " Set swap file directory
  set undodir=~/.vim/undo// " Set undo file directory
 
  " Enable syntax highlighting
 
  if has("syntax")
    syntax on
  endif
 
  " Locale settings
 
  let $LANG = 'ko_KR.UTF-8'


Step 4: Install Plugins

Open Vim and install the plugins by running the following command


  $ vim +PlugInstall +qall


The command "vim +PlugInstall +qall" is used to open Vim and automatically install the plugins specified in the .vimrc file using vim-plug.

+PlugInstall
  • This is an Ex command passed to Vim when it starts up.
  • PlugInstall is a command provided by vim-plug that installs all plugins listed in the .vimrc file.
+qall
  • This is another Ex command that tells Vim to quit all open windows.
  • After installing the plugins with PlugInstall, +qall will close Vim.




Comments

Popular posts from this blog

Resolving Key Exchange Failure When Connecting with SecureCRT to OpenSSH

SecureCRT] How to Back Up and Restore SecureCRT Settings on Windows

How to Set Up Vaultwarden (Bitwarden) on Synology NAS (Best Free Alternative to LastPass)