background preloader

Git Cheatsheet

Git Cheatsheet
stash workspace index local repository upstream repository status Displays: <br>• paths that have differences between the index file and the current <code>HEAD</code> commit, <br>• paths that have differences between the workspace and the index file, and <br>• paths in the workspace that are not tracked by git. diff Displays the differences not added to the index. diff commit or branch View the changes you have in your workspace relative to the named <em>commit</em>. add file... or dir... Adds the current content of new or modified files to the index, thus staging that content for inclusion in the next commit. add -u Adds the current content of modified (NOT NEW) files to the index. rm file(s)... Remove a file from the workspace and the index. mv file(s)... Move file in the workspace and the index. commit -a -m 'msg' Commit all files changed since your last commit, except untracked files (ie. all files that are already listed in the index). checkout files(s)... or dir reset HEAD file(s)... reset --hard

My Git Workflow Lately I’ve been acting as the unofficial Git consultant for Skribit, usually in response to @Stammy saying something on Twitter along the lines of “Hey, git just did something totally nonintuitive and now I can’t figure out what to do next.” I’ve been using Git long enough to know the answer, usually, or at least to be able to figure it out, plus I still remember how people used to SVN think, which helps. I think I’ve mentioned before how much I love Git. I’ve been a version control geek for a really long time: I remember getting way too excited about a feature that was like ‘git cherry-pick’ in some proprietary VCS we evaluated in 2000 or 2001. I still say that Darcs is the one I wish we had settled on, but I’ve grown to love Git over the past year or so, especially with GitHub making some of the rough spots so much easier. The thing that’s hard about Git for most people is the same thing that’s hard about all DVCS tools: if you’re used to centralized systems, they work weird. And you?

SSH in Python: A Quick Working Sample In one of my recent consulting projects, I had to use SSH from Python. After a little research, I ended up with using the paramiko package as library. Installing Libraries To download the paramiko package, just check out this link. That is not enough as I found out through a series of import errors. The ecdsa is a bit interesting. That is all about the installation of needed libraries. Sample to Run Remote Shell Command Let’s now take a look at the working sample code. As you can see, the code has one function that takes host, credentials, and a command to be executed. Troubleshooting Besides several import errors that pointed me to additional packages, I also got the following error in the end just before it started to work: The code that leads to this error is slightly different as follows: After debugging into it, I found the underlying library got password as None.

Moving a git repository subdirectory to its own repository at Mike Chambers I use Git and GitHub to manage all of my personal code projects. I have one large repository called projects, which is then broken into sub directories based on the main technology used for each project (i.e. Flash, JavaScript, iphone, etc...). I am currently working on a Flash based iphone game code-named "pewpew", which is maintained within my projects repository. As I have begun to work on it more and more, I decided that I wanted to have pewpew in its own git repository. This will make it easier to track issues, as well as give me the option of open sourcing it and allow others to create and submit forks. <! Initially it looked like the way to do this was to use git submodules. After following the steps in the article, I had to do one additional step before I could push the new repository to GitHub.

s blog » Linux Performance Analysis and Tools This page links to various Linux performance material I've created, including the tools maps on the right. These use a large font size to suit slide decks. You can also print them out for your office wall. They show: Linux observability tools, Linux static performance analysis tools, Linux benchmarking tools, Linux tuning tools, and Linux sar. There is also a hi-res diagram combining observability, static performance tuning, and perf-tools/bcc: png, svg (see discussion), but it is not as complete as the other diagrams. 12-Jul-2019: I have a new book coming out: BPF Performance Tools: Linux System and Application Observability. Tools perf_events: perf one-liners, examples, visualizations.eBPF tools: eBPF tracing tools and examples with bcc.perf-tools: perf analysis tools using Ftrace (github).bcc: perf analysis tools using eBPF (github).ktap: one-liners, examples, and scripts.Flame Graphs: using perf, SystemTap, and ktap. Documentation Talks 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. Resources

Gitorious linux-insides/linux-initialization-1.md at master · 0xAX/linux-insides A successful Git branching model » nvie.com Note of reflection (March 5, 2020)This model was conceived in 2010, now more than 10 years ago, and not very long after Git itself came into being. In those 10 years, git-flow (the branching model laid out in this article) has become hugely popular in many a software team to the point where people have started treating it like a standard of sorts — but unfortunately also as a dogma or panacea.During those 10 years, Git itself has taken the world by a storm, and the most popular type of software that is being developed with Git is shifting more towards web apps — at least in my filter bubble. Web apps are typically continuously delivered, not rolled back, and you don't have to support multiple versions of the software running in the wild.This is not the class of software that I had in mind when I wrote the blog post 10 years ago. Why git? ¶ For a thorough discussion on the pros and cons of Git compared to centralized source code control systems, see the web. The main branches ¶ develop

linux-insides/linux-mm-1.md at master · 0xAX/linux-insides Gladdy/EasyOpenCL

Related: