Skip to content

Instantly share code, notes, and snippets.

package main
import (
"fmt"
"golang.org/x/tour/tree"
)
func Walk(t *tree.Tree, ch chan int) {
if t == nil {
@motuwe
motuwe / git-selective-merge.md
Created November 29, 2018 09:10 — forked from katylava/git-selective-merge.md
git selective merge

Example: You have a branch refactor that is quite different from master. You can't merge all of the commits, or even every hunk in any single commit or master will break, but you have made a lot of improvements there that you would like to bring over to master.

Note: This will not preserve the original change authors. Only use if necessary, or if you don't mind losing that information, or if you are only merging your own work.

On master:

> git co -b temp
package com.example.demo.common.util;
import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.stereotype.Component;
/**
* SpringMVC应用上下文工具类
* @author Junqi Cai
@motuwe
motuwe / gitignore.not.working
Last active October 26, 2017 02:34
.gitignore在Ubuntu系统不生效
1.检查.gitignore文件系统是否是Windows|Mac文件系统。如果是,请转到2,如果不是,请转到3
2.请改为Unix文件系统
3.请执行git rm --cached {文件名}