- git status
Show the working tree status, i.e. what have I changed and what have I added. - git commit -a -m “my message”
Commit all my changes and store with the message “my message”. - git push origin
Push all my commits back to the remote server. - git tag
List the tags in the current branch. - git tag -a myTag -m “tag message”
Create a tag called myTag and store with the message “tag message”. - git show myTag
Show information about the tag myTag. - git branch myBranch
Create a branch called myBranch. - git branch
Display a list of all branches. - git merge myBranch
Merge the changes made on the current branch into myBranch. - git checkout myBranch
Switch code base to the branch myBranch.
When compiling small applications, its fairly easy just to compile using g++ from the command line. If you’re compiling anything more complex than a single file, its probably easier to use a Makefile. This example Makefile demonstrates how to compile an application that uses the GTKMM library. NAME=my-app CFLAGS=-g -Wall -o $(NAME) GTKFLAGS=`pkg-config --cflags --libs gtkmm-3.0` SRCS=main.cc myapp.cc CC=g++ # Do all all: main # Compile main: $(SRCS) $(CC) $(CFLAGS) $(SRCS) $(GTKFLAGS) # Clean clean: rm -f $(NAME) rm -f *.h~ rm -f *.cc~ rm -f Makefile~ rm -f *.glade~
Comments
Post a Comment