george

copy
0
0
add multiple text files to git repogit add Documentation/\*.txtAdds content from all \*.txt files under Documentation directory and its subdirectories

5 years, 1 month ago george 4 |

copy
0
0
add multiple git scripts to repogit add git-*.shConsiders adding content from all git-*.sh scripts. Because this example lets the shell expand the asterisk (i.e. you are listing the files explicitly), it does not consider subdir/git-foo.sh.

5 years, 1 month ago george 4 |

copy
1
1
commit all modificationsgit commit -am "Committing all modifications"Commit all current modifications to git repo, it's a good habit to run a "git status" before this command to make sure you know what your committing

5 years, 1 month ago george 4 |

copy
1
1
check the status of the current repogit statusGet the current status of all files that have been modified, added, or not yet committed

5 years, 1 month ago george 4 |

copy
0
0
Merge two branches into the current onegit merge fixes enhancements Merge branches fixes and enhancements on top of the current branch, making an octopus merge

5 years, 1 month ago george 4 |

copy
0
0
merge branch into current branch using a merge strategygit merge -s ours obsoleteMerge branch obsolete into the current branch, using ours merge strategy

5 years, 1 month ago george 4 |

copy
0
0
merge the branch but do not commit itgit merge --no-commit maintMerge branch maint into the current branch, but do not make a new commit automatically

5 years, 1 month ago george 4 |

copy
0
0
update the remote branches, then merge into currentgit pull, git pull originUpdate the remote-tracking branches for the repository you cloned from, then merge one of them into your current branch

5 years, 1 month ago george 4 |

copy
0
0
merge a remote branch into the currentgit pull origin nextMerge into the current branch the remote branch next

5 years, 1 month ago george 4 |

copy
0
0
fetch the changes from origingit fetch originThis leaves a copy of next temporarily in FETCH_HEAD, but does not update any remote-tracking branches. Using remote-tracking branches, the same can be done by invoking fetch and merge

5 years, 1 month ago george 4 |

copy
3
0
fetch and update multiple branches from remote repositorygit fetch origin +pu:pu maint:tmpThis updates (or creates, as necessary) branches pu and tmp in the local repository by fetching from the branches (respectively) pu and maint from the remote repository. The pu branch will be updated even if it is does not fast-forward, because it is prefixed with a plus sign; tmp will not be.

5 years, 1 month ago george 4 |

copy
1
0
change the filemodegit config core.filemode trueyou can set the filemode to true with

5 years, 1 month ago george 4 |

copy
2
0
change an entry in the configgit config core.gitproxy '"ssh" for kernel.org' 'for kernel.org$'The hypothetical proxy command entries actually have a postfix to discern what URL they apply to. Here is how to change the entry for kernel.org to "ssh". This makes sure that only the key/value pair for kernel.org is replaced.

5 years, 1 month ago george 4 |

copy
0
0
delete an entry in the git configgit config --unset diff.renamesTo delete the entry for renames If you want to delete an entry for a multivar (like core.gitproxy above), you have to provide a regex matching the value of exactly one line.

5 years, 1 month ago george 4 |

copy
0
0
get a value from the git configgit config --get core.filemodeTo query the value for a given key

5 years, 1 month ago george 4 |

copy
0
0
get all config values form a multivar git config --get-all core.gitproxyIf you want to know all the values for a multivar

5 years, 1 month ago george 4 |

copy
2
0
replace all core.gitproxy with a new onegit config --replace-all core.gitproxy sshIf you like to live dangerously, you can replace all core.gitproxy by a new one

5 years, 1 month ago george 4 |

copy
0
1
clone a local repogit clone /home/me/tmp/file.bundle R2clone the local repo /home/me/tmp/file.bundle to R2

5 years, 1 month ago george 4 |

copy
3
0
create a new branchgit branch my2.6.14 v2.6.14Create a new branch

5 years, 1 month ago george 4 |

copy
2
0
delete the remote-tracking branches git branch -d -r origin/todo origin/html origin/manDelete the remote-tracking branches "todo", "html" and "man". The next fetch or pull will create them again unless you configure them not to

5 years, 1 month ago george 4 |

copy
1
0
add remote git repositorygit remote add linux-nfs git://linux-nfs.org/pub/linux/nfs-2.6.gitAdd the remote repo git://linux-nfs.org/pub/linux/nfs-2.6.git and tag as linux-nfs

5 years, 1 month ago george 4 |

copy
1
0
create a git archive in tar formatgit archive --format=tar --prefix=git-1.4.0/ v1.4.0 | gzip >git-1.4.0.tar.gzCreate a compressed tarball for v1.4.0 release.

5 years, 1 month ago george 4 |

copy
14
0
cherry pick changes from specific hashgit cherry-pick 6a3ed15cherry pick changes from specific hash, 6a3ed15

5 years, 1 month ago george 4 |

copy
3
0
apply only the changes from topic^git cherry-pick topic^apply the change that would be shown by git show topic^. In this example, the patch does not apply cleanly, so information about the conflict is written to the index and working tree and no new commit results.

5 years, 1 month ago george 4 |

copy
4
0
cherry-pick very carefully git cherry-pick -Xpatience topic^Try to apply the change introduced by topic^ again, spending extra time to avoid mistakes based on incorrectly matching context lines

5 years, 1 month ago george 4 |

copy
3
1
cherry pick changes from full hashgit cherry-pick 5b4254f045afc31349a3502c9a2d4f693498889apull changes from 5b4254f045afc31349a3502c9a2d4f693498889a

5 years, 1 month ago george 4 |

copy
8
0
git rebase your current branchgit rebase originremove each of your commits from your branch, saving them as patches (in a directory named ".git/rebase"), update your branch to point at the latest version of origin, then apply each of the saved patches to the new branch

5 years, 1 month ago george 4 |

copy
10
1
Find and replace strings in OSXsed -i "" 's/find/replace/g' views.py

5 years, 1 month ago george 4 |

copy
9
1
to generate a key type ssh-keygenssh-keygenjust type ssh-keygen, u can also use "-t rsa" etc...

4 years, 8 months ago george 4 |

copy
18
0
Find all files larger than 100M on the systemfind / -size +100M -lsSearches / to find all large files on the system and display info about them

4 years, 7 months ago george 4 |

copy
0
0
rsync -a --files-from=:/path/file-list src:/ /tmp/copy

source | details |

copy
0
0
add multiple text files to git repogit add Documentation/\*.txtAdds content from all \*.txt files under Documentation directory and its subdirectories

5 years, 1 month ago george 4 |