Tag: commit

Git : add password for pushing some files

Is it possible to add a password for commiting and pushing some files/folders on a GIT repository ? Or any other way to prevent some users from commiting and pushing some files/folders they are not supposed to commit and push ?

Ordering git commits

i was wondering how to change the order of my commits on git (priority of versions), or to define a commit as “default” for cloning ? For example, i’ve three commits for my git project : -s0441254z5 | “new features in dev” (most recent) -p44mo47877 | “ENDED project” -g487er54ee | “First commit” (the oldest) I […]

Git – Cherry picking with ours/theirs strategy

I wonder if there is any way of cherry picking with ours/theirs strategy. On other words, I want to cherry pick multiple commits from dev branch into main branch with below commands, git cherry-pick HASH1 HASH2 HASH3 -n This command is supposed to take all referred commits and prepare unstaged changes if no conflicts. However, […]

Push file updates to GitHub

So I’ve done an initial commit on my files from my PC to GitHub with git checkout -b [branch] and git add . and git commit and all that. I’ve now made a change to that file, how can I update that file on GitHub and add a commit message? I tried git add on […]

git format-patch : how can I get it to ignore already merged commits?

I’m working on my copy of the perl repository on github and created a branch titled “perl-d-add-tests-2” for doing some changes, where I have commited some commits. I submitted these commits upstream and they were applied into “blead” (the main perl development branch). I pulled from the upstream repository, and did a “git merge” from […]

GIT SHA id of a file on remote git branch

I would like to know if there is any command available to get the SHA id of a particular file on a given specific git branch on the GIT remote server? Thanks, Srinivas

Clean up directory after GCC make

How can I clean up directory after compiling source codes with ‘make’, to do ‘git commit‘? Or what you do when commiting git?

Xcode git is not committing project.pbxproj

I have a remote git repository and I am trying to commit and push my latest changes. The problem is that everything commits fine except for project.pbxproj. Xcode does not complain. It just acts as if all committed with no issues. But when I push it complains that there are uncommitted changes. So I try […]

Must every git commit be an ancestor of a branch?

Given this git tree: A <— B <— C (HEAD, master) is it possible to put the tree into this state: A <— B (HEAD, master) <— C (There are no branches or tags other than master.) In other words, can a commit (C) exist without either being a commit pointed to by a branch […]

How to pick a commit in sub-branch and merge it into main branch?

So I have: master +commit1 +commit2 +commit3 myBranch +commitA +commitB +commitC I want to pick commitB in myBranch and merge it to master branch, what should I do?

Git Baby is a git and github fan, let's start git clone.