How to add project.pbxproj in.gitignore - react-native

I got a merge conflict every time I try to pull or merge from gitlab.
How to deal with these kinds of files?

I won't advise you to add project.pbxproj file to .gitignore. It is an important file in the Xcode configuration bundle. It is responsible for maintaining references to all of the linked files and their groupings, linked frameworks and the project’s build settings.
Take a look at this article for further information.
However, if you want to ignore this file in the future,
commit all changes
git rm --cached /App/App.xcodeproj/project.pbxproj
add /App/App.xcodeproj/project.pbxproj (or similar) to .gitignore
commit again

project.pbxproj filein only first time upload in git and .gitignore file i'm provide to replace your .gitignore file ...
# OSX
#
.DS_Store
# Xcode
#
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate
# Android/IntelliJ
#
build/
.idea
.gradle
local.properties
*.iml
# node.js
#
*.hprof
node_modules/
npm-debug.log
yarn-error.log
yarn.lock
# BUCK
buck-out/
\.buckd/
*.keystore
!debug.keystore
# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/
*/fastlane/report.xml
*/fastlane/Preview.html
*/fastlane/screenshots
# Bundle artifact
*.jsbundle
# CocoaPods
/ios/Pods/

Related

gclient issue when building Chromium on Windows

I'm following steps on https://chromium.googlesource.com/chromium/src/+/master/docs/windows_build_instructions.md to build Chromium on Windows, when it comes to run gclient, it gives following usage information, it seems something is wrong, any suggestion is appreciated.
C:\Users\Test>gclient
Usage: gclient.py [options]
Meta checkout dependency manager for Git.
Commands are:
config creates a .gclient file in the current directory
diff displays local diff for every dependencies
fetch fetches upstream commits for all modules
flatten flattens the solutions into a single DEPS file
getdep gets revision information and variable values from a DEPS file
grep greps through git repos managed by gclient
help prints list of commands or help for a specific command
metrics reports, and optionally modifies, the status of metric collection
pack generates a patch which can be applied at the root of the tree
recurse operates [command args ...] on all the dependencies
revert reverts all modifications in every dependencies
revinfo outputs revision info mapping for the client and its dependencies
root outputs the solution root (or current dir if there isn't one)
runhooks runs hooks for files that have been modified in the local working copy
setdep modifies dependency revisions and variable values in a DEPS file
status shows modification status for every dependencies
sync checkout/update all modules
validate validates the .gclient and DEPS syntax
verify verifies the DEPS file deps are only from allowed_hosts
Options:
--version show program's version number and exit
-h, --help show this help message and exit
-j JOBS, --jobs=JOBS Specify how many SCM commands can run in parallel;
defaults to 8 on this machine
-v, --verbose Produces additional output for diagnostics. Can be
used up to three times for more logging info.
--gclientfile=CONFIG_FILENAME
Specify an alternate .gclient file
--spec=SPEC create a gclient file containing the provided string.
Due to Cygwin/Python brokenness, it can't contain any
newlines.
--no-nag-max Ignored for backwards compatibility.
When I try it in a clean system, it works.

Why does my terminal give me an error when trying to cd to another directory

I am using iTerm and oh-my-zsh. When I try and cd into a directory on the command line I get this message Can't find a suitable configuration file in this directory or any parent: not found.
Here is an example: cd laracan't find a suitable configuration file in this directory or any parent: not found dock
.zshrc
# Path to your oh-my-zsh installation.
export ZSH="/Users/blake/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
ZSH_THEME="amuse"
# Which plugins would you like to load?
# Standard plugins can be found in ~/.oh-my-zsh/plugins/*
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(git)
source $ZSH/oh-my-zsh.sh
# User configuration
# Completions Path
fpath=(/usr/local/share/zsh-completions $fpath)
## ALIASES
alias ls='ls -GFh'
alias ll='ls -al'
alias cpwd='pwd | pbcopy; pwd'
## GIT ALIASES
alias gs='git status'
# Checkout
alias co='git checkout'
alias cot='git checkout test'
# Pull and Push
alias pullo='git pull origin'
alias pusho='git push origin'
# Merge
alias gm='git merge'
alias mert='git merge test'

trying to push file into bitbucket repo, but showing wrong repo

Normally I open a bash prompt inside my Test folder. I then git add, commit, and push origin the file and it goes into my Test folder in bitbucket. Now somehow my Test folder instead of showing .../Test (Development), it shows another repo, .../Test (Review). I do not know why it changed. How can I get (Review) to be (Development)?
In git there are pretty much three stages. When pressing git status you probably get a similar few to this with many more files:
# On branch review
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# modified: file.txt
#
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: file2.txt
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# file3.txt
file.txt on top has staged changes. These will go into the next commit when you do git commit.
file2.txt has unstaged changes. This file is tracked in the repository but the changes will not be added to the next commit. Only if you git add this file will it get staged.
file3.txt is an untracked file. You have to add it with git add which will automatically put it into the staged area. Next time you will make changes to it you will find it in the unstaged area like file2.txt
from this situation git checkout master gives:
error: Your local changes to the following files would be overwritten by checkout:
file2.txt
Please, commit your changes or stash them before you can switch branches.
Aborting
This is probably what you get too. Git noticed that you made changes in the tracked file file2.txt but you didn't specify what to do with them. Similarly I suspect that you made changed to those '50 or so files' and now git doesn't know what to do.
Either add them to your commit and do a commit:
git add <files>
git commit -m "did some work"
or drop the changes:
git checkout <files>
Then they will return to the way they were at the last commit.
You can also add some files and drop others, or even do partial adds with git add -p.
Check the changes you made with git diff.
After this is resolved you can switch branches again with git checkout <branchname>.
Without more information on your branch structure in your bitbucket and your commit history it is hard to say what you can push to where.

Packaging directory with cpack for rpm

I am trying to create a rpm package with directory with lot of files using cmake
http://www.rpm.org/max-rpm/s1-rpm-inside-files-list.html
To make this situation a bit easier, if the %files list contains a path to a directory, RPM will automatically package every file in that directory, as well as every file in each subdirectory. Shell-style globbing can also be used in the %files list.
So with cmake I am using the following command:
INSTALL(DIRECTORY my_dir DESTINATION foo)
and I end up with a spec file with all the files (30k lines) instead of something like
%file
my_dir
Did I miss something on my cmake/cpack command or the is no other way to do it?
(using a tar and an extracting it is not suitable)

How do I clone a git repo from a local svn repo

I want to learn to use git-svn. I have an svn local repository on my disk that I've checked out a while ago using something like this:
svn co http://myserver.com/mysvnrepo/trunk/ /mysvnrepo/
ls -a /mysvnrepo/
. .. .svn foo bar
This /mysvnrepo/ is HUGE, so I want to avoid re-downloading or copying the files at all costs.
I'm wondering if there's a way to git clone this local repo without downloading / copying anything (because it's already there).
I have this which seems to be what I'm looking for, but when I do that it doesn't quite give me what I expect.
cd /mysvnrepo/
git svn clone file://mysvnrepo/
ls /mysvnrepo/
. .. .git .svn foo bar
git status
# On branch master
#
# Initial commit
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# .svn/
# foo/
# bar/
I would expect git to detect foo and bar as "versioned and up-to-date".
According to the docs it seems that I need to use git svn init because git svn clone runs a fetch, which I certainly don't want. So I tried
git svn init --trunk=file:///mysvnrepo/
...but no luck.
I'm completely new to git, so my confusion is off-the-charts... am I doing something utterly wrong?
Thanks in advance
You cannot take a subversion snapshot and convert it into a git repository.
It sounds like you are trying to avoid a lengthy initialization of the git repository from svn: which ordinarily will try to ready your entire history. This can be done in another way, by limiting the fetch to recent history depending on how much history is relevant to you:
git svn clone -s -r 12334:HEAD https://svn.host.org/repo
Where 12334 is the earliest svn revision you are interested in and assuming that the repo is laid out in a standard svn way with branches and tags.