Below you will find pages that utilize the taxonomy term “Git”
My Git Workflow
Proceeding with my sequence of posts about version control systems, I’ll explain my Git workflow. It’s quite simple, after set up, the day to day workflow is as follows:
- get the latest information from remote server:
git pull --ff-only
- create a new branch and switch to it:
git checkout -b branch_name
- work, work, work, then commit:
git commit
- go back to master:
git checkout master
- check if there’s something new:
git pull --ff-only
- merge my work back into master:
git rebase branch_name
- upload the modifications to server:
git push
And since I reached the magic number seven, those are the seven steps.
Version Control Systems
A while ago, Fábio Akita from AkitaOnRails.com launched the campaign “Beginners’s Friday” intended to help the new generation of developers coming today. I’m totally buying into this idea and this is the first post I’m doing in that direction with version control systems.
Version Control Systems
What is a version control system? In the context of software development, a version control, revision control or source control system is a software designed to control changes to computer programs (as well as documents, sites and virtually whatever you want). Gone are the days of copying and pasting files and changing the name “index.php,” “index-2.php,” “index-now-works.php,” “index-now-it-really-works.php” and so on. In fact, those days should have never existed in the first place, since revision control systems are hanging around for a really long time (well, they’re older than me, as we’ll see below).
Migrating and pruning repos
Recently I had to put a folder from my app repository into a separate
repository on its own. The easiest way was just git init
a new
repo, copy the directory and git commit
it, but I would lose
all history up until the move. After fiddling with git and Stack
Overflow, I found the
solution.
Suppose the structure is like this:
All-in-one repo:
* server
* code.go
* code2.go
* iOS
* code.m
* code.h
* Android
* src
* com
* cafelinear
* myapp
* Code.java
* Code2.java
We want to move the server code into its own repo, so, final result will be like this: