This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Get a list of files you want to commit | |
$ git status | |
Changes not staged for commit: | |
(use "git add <file>..." to update what will be committed) | |
(use "git checkout -- <file>..." to discard changes in working directory) | |
modified: file1 | |
modified: file2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git clone --mirror: to clone every references (commits, tags, branches) | |
git push --mirror: to push everything | |
That would give: | |
git clone --mirror https://bitbucket.org/exampleuser/repository-to-mirror.git | |
# Make a bare mirrored clone of the repository | |
cd repository-to-mirror.git | |
git remote set-url --push origin https://github.com/exampleuser/mirrored | |
# Set the push location to your mirror |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
With git log check which commit is one prior the merge. Then you can reset it using: | |
git reset --hard commit_sha | |
There's also another way | |
git reset --hard HEAD~1 | |
will get you back 1 commit. | |
Be aware that any modified and uncommitted/unstashed files will be reset to their unmodified state. | |
To keep them either stash changes away or see --merge option below. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Remove rubberband scrolling from web apps on mobile safari and standalone (iOS)</title> | |
<meta name="apple-mobile-web-app-capable" content="yes"> | |
<meta name="apple-touch-fullscreen" content="yes"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no"> | |
<style> | |
html, body {margin: 0; padding: 0; width:100%; height:100%; overflow: hidden; background: #333} | |
p.center { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add our dependencies | |
var gulp = require('gulp'), // Main Gulp module | |
concat = require('gulp-concat'), // Gulp File concatenation plugin | |
open = require('gulp-open'), // Gulp browser opening plugin | |
connect = require('gulp-connect'); // Gulp Web server runner plugin | |
// Configuration | |
var configuration = { | |
paths: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# only if you do not add the original repository as upstream | |
git remote add upstream https://github.com/original_github_username/original_github_repo_name.git | |
# then fetch and create a new branch for your pr | |
git fetch --all | |
git checkout -b new-branch-name-for-pr upstream/master | |
# pick the commits you want to include in your pr | |
git cherry-pick a52afa1 | |
git cherry-pick 08f39f7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class UtilsForCollections { | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class UtilsForCollections { | |
private UtilsForCollections() { | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static <T> List<T> toList(T[] array) { | |
// TODO implement but how? | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static <T> List<T> toList(T[] array) { | |
return Arrays.stream(array).collect(Collectors.toList()); | |
} |
OlderNewer