Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

github command

# Main git commands

# Configurations

git config --global user.name "Sam Smith"
git config --global user.email sam@example.com

# New Repository

git init

# Copy local repository

git clone /path/to/repository 

# Copy local repository for remote servers

git clone username@host:/path/to/repository

# Add files

git add <filename>

git add *

# Git Commits

git commit -m "Commit message"

# Commit any files added with git add command

git commit -a

# Push changes to master branch

git push origin master

# Check the status of files

git status

# Connect to remote repository

git remote add origin <server>

# Provide a list of recently configured remote repositories

git remote -v

# Create new branch then switch to it

git checkout -b <branchname>

# Switch branches

git checkout <branchname>

#List all branches in repository

git branch

# Delete the feature branch 

git branch -d <branchname>

# Push selected branch to your remote repository

git push origin <branchname>

# Push all branches to remote repository

git push --all origin

# Delete a branch on the remote repository

git push origin :<branchname>

# Fetch and merge changes on remote server to certain directory

git pull

# Merge a different branch into active branch

git merge <branchname>

# View merge conflicts

git diff

git diff --base <filename>

git diff <sourcebranch> <targetbranch>

# Mark changed file

git add <filename>

# Utilise tagging to mark a certain changeset

git tag 1.0.0 <commitID>

# Get changeset ID

git log

# Push all tags to remote repository

git push --tags origin

# Undo local changes, replace changes

git checkout -- <filename>

# Drop all changes and commits

git fetch origin

git reset --hard origin/master

# Search the working directory for foo(); (example)

git grep "foo()"
Comment

github commands

github all commonly used command sheet  
Comment

PREVIOUS NEXT
Code Example
Shell :: laravel sail install php mongodb extension 
Shell :: brew upgrade all casks 
Shell :: warning: LF will be replaced by CRLF 
Shell :: how to get github url 
Shell :: brew command not found 
Shell :: surge flutter web 
Shell :: create branch based to other branch ex. master 
Shell :: cmd substring replace 
Shell :: linux env 
Shell :: como instalar brew en linux 
Shell :: git remove ignored files 
Shell :: git pull sith ssh key 
Shell :: remove .idea folder from git 
Shell :: git checkout 
Shell :: zip linux exclude directory 
Shell :: windows terminal guid 
Shell :: cambiar nombre branch git 
Shell :: create user linux 
Shell :: reinstall nvidia drivers pop os 
Shell :: flutter android sdk manager not found 
Shell :: clear the git stash 
Shell :: docker compose latest version install ubuntu 
Shell :: add user via drush drupal 8 
Shell :: git pull override local changes 
Shell :: kernel headers were not found vmware kali linux 
Shell :: download telegram for ubuntu 
Shell :: docker image rm image without tag 
Shell :: git go back to previous commit temporarily 
Shell :: react app deploy on github pages 
Shell :: omv install script 
ADD CONTENT
Topic
Content
Source link
Name
6+5 =